Boost Users :
Subject: Re: [Boost-users] [Threads] How to keep number of running thread constant, performing different operations
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2011-06-17 06:20:31
On Fri, Jun 17, 2011 at 11:10 AM, Lars Viklund <zao_at_[hidden]> wrote:
> On Fri, Jun 17, 2011 at 10:12:47AM +0200, Ovanes Markarian wrote:
> > On Fri, Jun 17, 2011 at 9:05 AM, Alessandro Candini <candini_at_[hidden]>
> For managing the N threads, you can use a thread_group.
Yes, but than you must implement and debug your own thread pool pattern.
Thread group only creates a number of threads, but you need to implement the
producer/consumer problem to retrieve work tasks from each thread from the
queue. Now there is a choise to either use a ready thread pool or implement
it yourself... AFAIK Boost has no official thread pool
implementation, which is not in internal impl namespace and guarantees the
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net