Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

How to specify task priority for an algorithm

SNena1
New Contributor I
114 Views

Hi I have 2 types of algorithms which I need to run concurrently. One type is very high priority and should be finished as soon as possible, while another type should ideally only fill in the cracks and be executed only when first high  priory algorithm is not utilizing all the worker threads. 

How do I achieve that with tbb and get usual tbb task stealing/worker thread sharing as it would do without any priorities?  The only priority functionality I found was in task arena constructor, but if I create 2 task arenas, won't it create 2x more worker threads and I get cpu core over subscription ?

 

Thanks.

 

0 Kudos
0 Replies
Reply