§5.2.(a) Activation block

A team can be activated thread local by the block construct

within (myTeam) { stmts }

If stmts has only one statement this can be abbreviated to

within (myTeam) stmt

In these statements, myTeam must denote a team instance. For the time of executing this block, this team instance is activated for the current thread, which has entered the within block.

The within block statement guarantees that it leaves the team in exactly the same activation state as it was in when entering this block. This includes the cases of exceptions, meaning that deactivation will also occur if the execution of the block terminates abnormally.