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

Cases where tbb task scheduler does not execute tbb::task::execute()

andreivictor
Beginner
135 Views
Hello.

Recently, I have been having problems with the task scheduler as it doesn't seem to call the tbb::task I created and spawned via the task scheduler. Are there any conditions or cases when the task scheduler doesn't execute tbb::tasks at all. I initially assumed there were none but given this behavior, I just have to make sure. :)

By the way, my usage of the task tree is only up to level 1 deep. So, spawn tasks doesn't spawn other tasks.

I appreciate any input on this.

- Edit - It sees like it spawns fine but the problem was preemption.
0 Kudos
1 Solution
RafSchietekat
Black Belt
135 Views
If you don't have available parallelism, a spawned task will only be executed when you wait for it.

View solution in original post

1 Reply
RafSchietekat
Black Belt
136 Views
If you don't have available parallelism, a spawned task will only be executed when you wait for it.
Reply