Boost logo

Boost :

From: Preston A. Elder (prez_at_[hidden])
Date: 2005-02-08 20:16:39


Is there any fantastically good reason why there is no way of getting a
count of how many threads are being handled by a thread_group?

I want to set up a worker thread pool, a new thread is added as the queue
size goes up, and it removed itself if the queue size is not enough to
warrant it. This mechanism, however, is complicated muchly when
thread_group doesn't have a way for me to determine how many threads I
currently have, in an effort to ensure the ending the thread will cause it
to go below the minimum, or spawning a new one go above the maximum.

Obviously, I could write my own thread_group, but I can think of no reason
for boost's thread_group to not have a count() method.

-- 
PreZ :)
Founder. The Neuromancy Society (http://www.neuromancy.net)

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk