Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

How to reset number_of_threads

Hi, guys,

One of SDK, which I use, initialized the tbb internally at its startup.

I wan to reset the number of threads of TBB to a large value.

But tbb::task_scheduler_init::initialize( int number_of_threads) can't help me do this update.

Is there any other way to do it?

Thanks!


0 Kudos
3 Replies
Highlighted
Black Belt
13 Views

Why? (rhetorical question, too short to post by tself)
0 Kudos
Highlighted
Beginner
13 Views

I want to create some tasks which live in whole process life time, and they can execute concurrently.
If I didn't enlarge the thread count, one task is holding all the time until the other task execution exit.

_TBB_Yield() could help on this?

Thanks!
0 Kudos
Highlighted
Black Belt
13 Views

I don't know what you plan to do with those, but you should probably use tbb_thread instead. Tasks are suitable (but then also preferable) only for finite amounts of CPU-bound work without required concurrency (the program should also work with a single thread).

Don't use __TBB_Yield() in your programs.
0 Kudos