Re: [tcljava-user] How to kill a jacl thread
Brought to you by:
mdejong
From: Mo D. <mo...@mo...> - 2009-01-29 19:58:58
|
Jared Hodge wrote: > > Is there a good way to kill a jacl thread quickly from another thread? > I’m launching a large script and that has many calls to custom java > code (some of which take a while themselves), and sometimes I want to > just kill the whole thread off and start another one. The problem is > that the doOneEvent call seems to not exit until the script is > complete and so I can’t find a good way of getting the run thread to > exit. It seems that all other ways of exiting a thread have been > deprecated. Ideally I’d like to stop the thread dead in its tracks in > the middle of a java call, but that’s probably beyond the scope of > this mailing list. A reasonable alternative is to stop between > evaluations in the jacl interpreter, but I need some sort of low-level > hook inside the doOneEvent call. Does this already exist? > > Thanks > > -Jared > > ------------------------------------------------------------------------ See the Interp.setInterrupt() API. It is not possible to just kill a Java thread like that, this API is as close as it gets. Mo DeJong |