The CriticalSection component provides a simple mechanism to synchronize sections of code that can only be executed by a single thread at the same time.
Improper usage of this component may cause concurrency bugs and impact performance. Use it only if you really understand concurrency issues and their implications.
The code in this example enters and leaves a critical section:
enter CriticalSection using name = "aCriticalSection" // ... // Your critial code goes here // ... leave CriticalSection using name = "aCriticalSection"