[threads-standard-discuss] Worker thread pools and some kind of thread-finished-p predicate

Howdy, Araneida uses a worker thread pool to generate its HTTP responses when running in threaded mode. In order to replenish the pool, it needs to determine whether a thread is "alive" in some metaphorical sense or is "finished". I know Dan has expressed reservation over some kind of general process state function, but I believe that alive versus finished is appropriate to all known threading systems, and furthermore necessary to be able to do serious work with thread pools. To that end I would propose that a predicate thread-finished-p should be added, which returns true when a thread is no longer eligible for execution, either by normal or abnormal termination. Thoughts? -- Brian Mastenbrook "God made the natural numbers; http://www.cs.indiana.edu/~bmastenb/ all else is the work of man." bmastenb@cs.indiana.edu -- Leopold Kroneker

On Wed, 21 Jul 2004 at 12:25:23 -0500, Brian Mastenbrook wrote:
To that end I would propose that a predicate thread-finished-p should be added, which returns true when a thread is no longer eligible for execution, either by normal or abnormal termination.
I like the idea of this predicate, but I'd rather see it called THREAD- ALIVE-P, instead of THREAD-FINISHED-P. "Finished" might carry some vague connotation that the thread has run through to an orderly completion ("I've finished my work), but "alive" is just the opposite of dead. -Peter
participants (2)
-
Brian Mastenbrook
-
Peter Graves