# TASKWAIT

OpenMP* Fortran Compiler Directive: Specifies a wait on the completion of child tasks generated since the beginning of the current task.

!$OMP TASKWAIT [clause[[,] clause]...]

clause | Is only allowed for ifx. It is one or more of the following: DEPEND (dependence-type : list) The dependence-type MUTEXINOUTSET cannot be specified in a TASKWAIT directive. NOWAIT This clause can only be specified if at least one DEPEND clause is also specified. Only one NOWAIT clause can be specified in a TASKWAIT directive.

A TASKWAIT construct binds to the current task region. The binding thread set of the taskwait region is the current team.

When the DEPEND clause is not specified, the current task region is suspended at an implicit scheduling point in the construct until the child tasks that the current task generated prior to the TASKWAIT have completed execution.

A TASKWAIT construct with one or more DEPEND clauses and a NOWAIT clause behaves as if the clauses were applied to a TASK construct with an empty structured block that generates a task whose execution is deferred until all preceding tasks of the current task complete execution before subsequently generated tasks that depend on this task begin execution.

A TASKWAIT construct with one or more DEPEND clauses and no NOWAIT clause behaves as if the DEPEND clauses were applied to a TASK construct with an empty structured block that generates an included and mergeable task. The current task is suspended until the preceding tasks of the current task complete execution.

Parent topic: T to Z

## See Also

OpenMP Fortran Compiler Directives
Syntax Rules for Compiler Directives
TASK directive
TASKYIELD directive
Parallel Processing Model for information about Binding Sets