Re: [Boost-users] [threads] extension proposal
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
Oliver, looks like what I need ;) The only question is, what does stop() function of a defer_point? Will it stop all tasks immediately or will it wait until the task queue is empty and stop it then? Are there some plans to integrate this into the official boost release? It would be nice to provide support for different queue policies, like priority queue etc... May be there are more wishes, like Vsevolod stated, by adding support for threading or process policies... With Kind Regards, Ovanes Markarian On Tue, August 8, 2006 07:48, Oliver.Kowalke@qimonda.com wrote:
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 _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Oliver.Kowalke@qimonda.com
-
Ovanes Markarian