I study the work of OpenMP (I work with gcc-4.7.4 sources). My question is this: is there a task transfer between threads during operation? That is, if we allow one of the two threads to be idle, then some of the tasks from the other thread are transferred to it?

    1 answer 1

    If "tasks" are iterations of a loop, then there is a schedule option that defines the distribution of tasks. Here you have to think for yourself which one is appropriate. In addition, only the creation of a task pool comes up from which task-safe threads will snatch tasks.