cilk_sync

The cilk_sync statement indicates that the current function cannot continue in parallel with its spawned children. After the children all complete, the current function can continue.

The syntax is as follows:


cilk_sync;

cilk_sync only syncs with children spawned by this function. Children of other functions are not affected.

There is an implicit cilk_sync at the end of every function and every try block that contains a cilk_spawn. The implicit cilk_sync occurs after destructors are invoked. The semantic is defined this way for these reasons:


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.