TBB spawns more threads than requested

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!

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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."

Leave a Comment

Please sign in to add a comment. Not a member? Join today