I watch threads at a much higher level -

What I did was pass in the user session to each thread and the thread would report its status into that session variable.  When the sessions get cleaned up any threads they 'knew' about were killed.

You can setup an application level variable and have each thread register itself. Then use taskkit to check them on an interval.

-Aaron

Hancock, David (DHANCOCK) wrote:
Signals and Webware/WebKit

We occasionally spawn long-running processes from WebKit servlets, and sometimes they hang up. We'd like a way to detect this and abort cleanly.  In process-land, we would have done this with os.signal, SIGALRM, and a signal handler.  This isn't working out for us in a servlet, probably because signal handlers have to be in the main thread, and signals can only go to the main thread. We seem unable to get the signal propagated to the main thread.  (And once we figure that out, we're wondering what happens if two or more child threads are running the same process and the main thread gets a signal.)

Has anybody got some pointers to information about how to do this?  Not necessarily with signals, but the goal is simply to have a process/thread time out after a certain period if it's not finished.

Thanks for any insight you can offer.

Cheers!
--
David Hancock | dhancock@arinc.com | 410-266-4384