The syntax of the taskyield construct is as follows:
#pragma omp taskyield new-line
Summary The taskyield construct specifies that the current task can be suspended in favor of execution of a different task. The taskyield construct is a stand-alone directive.
Binding A taskyield region binds to the current task region. The binding thread set of the taskyield region is the current team.
Description The taskyield region includes an explicit task scheduling point in the current task region.