CriticalSection
This feature is not supported on the Wolfram Cloud.

CriticalSection[{var1,var2,},expr]
locks the variables with respect to parallel computation, evaluates expr, then releases the .

DetailsDetails

  • At most one instance of a critical section with the same lock variable is allowed to run concurrently on any parallel kernel.
  • Variables used as locks should not have a value in the master kernel.
Introduced in 2008
(7.0)