Skip to content

Commit

Permalink
rename maybeKill to checkKill, and make it public
Browse files Browse the repository at this point in the history
  • Loading branch information
krestenkrab committed Dec 3, 2009
1 parent 4dadb71 commit 6b30eb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/kilim/Mailbox.java
Expand Up @@ -331,6 +331,7 @@ public boolean putnb(T msg) {

public void put(T msg) throws Pausable {
Task t = Task.getCurrentTask();
t.checkKill();
while (!put(msg, t)) {
Task.pause(this);
}
Expand Down
6 changes: 3 additions & 3 deletions src/kilim/Task.java
Expand Up @@ -134,9 +134,9 @@ public void kill(Error ex) {
resume();
}

private void maybeKill() {
public void checkKill() {
if (this.death_ex != null) {
System.err.println("killing "+this+": throw "+death_ex);
// System.err.println("killing "+this+": throw "+death_ex);
throw this.death_ex;
}
}
Expand Down Expand Up @@ -292,7 +292,7 @@ public static void pause(PauseReason pauseReason, Fiber f) {
f.task.setPauseReason(null);
}
f.togglePause();
f.task.maybeKill();
f.task.checkKill();
}

/*
Expand Down

0 comments on commit 6b30eb0

Please sign in to comment.