In the main thread, we start to run parallel tasks with tbb::parallel_while. Now we have a requirement to create one separate new task and run it in the main thread during the execution of parallel_while.
Firstly, I think we have to exclude the main thread from the worker threads of parallel_while.
Secondly, we have to create the new task and run it in the main thread.
Is this possible? How to accomplish both of these?