[chuck-users] Killing thread from without
Hans Aberg
haberg at math.su.se
Tue Apr 21 16:58:37 EDT 2009
On 21 Apr 2009, at 21:32, Kassen wrote:
> You can also have the Shred report it's number using me.id() inside
> that shred and set Machine.remove(int id ) loose on that.
One can replace the foo.exit() by:
if (foo != null)
Machine.remove(foo.id());
Then the reference is not set to null when it is killed, so one needs
to have:
fun void bar(dur t) {
t => now;
s[x][y] =< r;
null => foo;
}
So my use of exit() should have been correct.
One problem is that one gets a lot of printouts:
[chuck](VM): removing shred: 32 (spork~exp)...
When using <<< ... >>>, printouts cause a slight delays, that at least
on a slow machine may make fast keyboard playing impossible.
Hans
More information about the chuck-users
mailing list