Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Stephan_E_
Beginner
32 Views

TBB spawns more threads than requested

Hi all,

I am implementing and tuning an algorithm and need to specify for the exact number of threads to use. I can observe that no more threads than specified are active at a time, however the scheduler seems to sometimes spawn new threads. Old theads then become idle.

Can anyone please elaborate why the scheduler thinks this is worthwhile?

Thanks and Best Regards!

0 Kudos
1 Reply
RafSchietekat
Black Belt
32 Views

In "Bug with tbb::task_scheduler_init()?", Alexey Kukanov refers to a note in the Reference Manual for task_scheduler_init that, in the latest PDF version I have, reads: "Some implementations create more workers than necessary. However, the excess workers remain asleep unless needed."

Reply