8 Aug
2006
8 Aug
'06
5:48 a.m.
Hello Ovanes, please look into the boost vault (Concurrent Programming). I think the defer library fits your needs. The thread pool pre-spawns N threads which operate on a special queue (inside of the pool). If no task (boost::function objects) is queued all threads are set to sleep - if a task arives the queue one thread is awakened and fetches the task item from the queue and executes it (after that the thread goes to sleep again). The library was originally developed by Simon Meiklejohn. I've added the queue-stuff. regards, Oliver