From: Alex Ott (alexott_at_[hidden])
Date: 2007-10-31 10:20:00
There is working implementation at http://threadpool.sourceforge.net/
- it already fixed to match new boost.thread.
I had used it not so far for my tests, and it's works fine
On 10/31/07, Dean Michael Berris <mikhailberis_at_[hidden]> wrote:
> Hi Everyone,
> Has there been any development with regards to a working, portable
> Boost.Thread based Thread Pool library?
> Personally I've been using the following sample idiom for achieving
> what a thread pool is supposed to be accomplishing -- and I'm
> wondering (aloud) whether there are any existing implementations out
> there that rely solely on Boost.Thread. Currently, the following code
> snippet requires Boost.Asio, but I'm not sure if there's something
> that may be distilled from the recurring pattern below:
> using namespace boost::asio;
> using namespace boost;
> io_service process_queue;
> shared_ptr<io_service::work> sentinel(new io_service::work(process_queue));
> thread_group processor_threads;
> for(unsigned int spawn_counter = THREAD_COUNT;
> spawn_counter > 0;
> bind(&io_service::work, &process_queue)
> // add all void nullary functors and post them here
> // once all the work has been queued, remove the sentinel
> Will something like this be useful as a utility library? Insights,
> pointers, and suggestions would be very much appreciated.
> Have a great day everyone!
> Dean Michael C. Berris
> Software Engineer, Friendster, Inc.
> [+63 928 7291459]
> [+1 408 4049523]
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- With best wishes, Alex Ott, MBA http://alexott.blogspot.com/ http://alexott-ru.blogspot.com/ http://content-filtering.blogspot.com/ http://xtalk.msk.su/~ott/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk