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

Brian Mastenbrook bmastenb at cs.indiana.edu
Wed Jul 21 17:25:23 UTC 2004


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 at cs.indiana.edu                    -- Leopold Kroneker




More information about the Threads-standard-discuss mailing list