The following declares a critical section:

critical object {
	doSomething()
}

The expression labeled "object" above must represent a valid object that the execution environment can use as a "lock" object to synchronize thread access to the block of code that follows. The environment will then create a mutual exclusion lock on the given object, ensuring that only one thread at a time can have access to the code block.


Twitter Facebook LinkedIn Youtube Slideshare Github