
26 Jul
2010
26 Jul
'10
3:38 p.m.
You only launch *two* tasks. They keep going back to the queue to get new work when they finished their current item. --- Perhaps something like this then: while ( !jobs.empty() ) { if ( thread_count < cores ) { boost::thread t(boost::bind(&worker, jobs.front())); jobs.pop(); t.join(); } } What is the correct way to determine the number of running/busy threads (thread_count)? _________________________________________________________________ Hotmail: Powerful Free email with security by Microsoft. https://signup.live.com/signup.aspx?id=60969