Release Operation - Semaphore Settings Edit Tab

Release Operation

Use the Release operation when you want direct control over the count or when you use semaphores in a way that requires unmatched increments and decrements. When you enable the Auto Release option for the Acquire operation, do not explicitly release the semaphore using the Release operation. Enable the Release option on the left of the Semaphore Settings panel.

The Release operation contains the following option:

  • Semaphore Name or Reference Expression —The semaphore on which to perform the operation. You can specify the semaphore by name or by the object reference you receive when you create the semaphore using the Use Object Reference for the Semaphore Reference Lifetime option.

The Release operation immediately increments the count for the semaphore. If you perform the Acquire operation with the Auto Release option enabled, do not use the Release operation. Typically, you use the Release operation only on semaphores that require unmatched increments and decrements. For example, when you create a semaphore with an initial count of zero, all threads block when they perform an acquire. You can then perform Release operations to release the threads when you are ready.