Boost logo

Boost Users :

Subject: Re: [Boost-users] Using boost::thread to keep all cores busy
From: Eric J. Holtman (eric_at_[hidden])
Date: 2010-07-26 10:41:01


On 7/26/2010 9:37 AM, Internet Retard wrote:
>
>
> All at once? What if I have millions of tasks rather than a few? I
> want to be working on 2 tasks all the time. If my queue is not empty,
> then as a thread ends, it sees there are more tasks in the queue and
> gets one.
>

You only launch *two* tasks. They keep going back to the
queue to get new work when they finished their current item.



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