Hi, I was wondering how this could be done:We have different parts of the software that have different priorities. For instance lets imagine we have a user thread and a low-level processing thread. Each of them may call parallel algorithms (sort, for, for_each, pipelines, ...) We would like to have user-level threads have more priority when executing parallel tasks.What I was thinking is something like that: set a priority on a "master" thread and dependant sub-tasks gets priority queued accordingly within tbb. Therefore, worker threads would pop items from the task queue in order or priority.Or maybe it is the other way around and it is masters that asks for tasks to perform and dispatch.. Therefore, a master with a higher priority would have more chances to get CPU time and therefore send job to workers threads more often..Mike
assigning a priority to a task/algorithm
For more complete information about compiler optimizations, see our Optimization Notice.