\pagebreak
\section{Worksharing Constructs Inside a \code{critical} Construct}
\label{sec:worksharing_critical}

The following example demonstrates using a worksharing construct inside a \code{critical} 
construct. This example is conforming because the worksharing \code{single}  
region is not closely nested inside the \code{critical} region. A single thread 
executes the one and only section in the \code{sections} region, and executes 
the \code{critical} region. The same thread encounters the nested \code{parallel} 
region, creates a new team of threads, and becomes the master of the new team. 
One of the threads in the new team enters the \code{single} region and increments 
\code{i} by \code{1}. At the end of this example \code{i} is equal to \code{2}.

\cexample{worksharing_critical}{1}

\fexample{worksharing_critical}{1}


