The OpenMP specification document says that "When a thread encounters a task construct, it may
choose to execute the task immediately or defer its execution until a later time". However, the specification does not say how this choice is made.
How does the thread decide when to execute the task immediately and when to defer the execution? If this is implementation specific, how does compilers like gcc solve this?