[chuck-users] soft kill

Bastian Schumacher bastian.schumacher at yahoo.de
Sat Aug 18 21:10:50 EDT 2012

Am 18.08.2012 um 23:47 schrieb Kassen:

> On 18 August 2012 19:47, Bastian Schumacher <bastian.schumacher at yahoo.de> wrote:
>> Hi Michael,
>> killing a thread means means immediate de-scheduling. There is not such a thing as "soft kill" in any software because the scheduler is not the place where that kind of functionality belongs to. What you want is a "quit"-mechanism for your program:
> Yes, indeed. It'd need to be a static member of a public class, in
> practice; environment variable checking is too slow for this.
> Sadly this means quite a bit of planning ahead, making it unsuitable
> for spontaneous improvisation.

Why shouldn't it be possible to write a class for the pre-planned part which you can use to include your live code and pass the parameters during runtime (directly after leaving the loop). At least this would be an adequate solution from the theoretic standpoint. One could use a key from the keyboard as trigger button and the code may alter the parameters of the exit code if the tail may vary. I don't see anything that chuck can do now that could not be done using that technique.

More information about the chuck-users mailing list