Semaphore.ReleaseSemaphoreEx
- Updated2025-07-21
- 1 minute(s) read
Semaphore.ReleaseSemaphoreEx
Syntax
Semaphore.ReleaseSemaphoreEx( sequenceContextObj, threadId)
Purpose
Performs a Release (increment) operation on the semaphore. Use this method when you want direct control over the count of the semaphore or when you use semaphores in a way that requires unmatched increments and decrements. When you use the Semaphore.AcquireSemaphoreWithAutoReleaser method, releasing the last reference to the AutoReleaser object calls this method automatically.
Parameters
sequenceContextObj As Object
[In] Specifies a sequence context when you call this method from within a step of an execution. You must use the sequence context of the sequence in which you are calling this method. Pass a NULL reference when you do not call this method from an execution.
threadId As String
[In] Specifies the thread ID of the thread that releases the semaphore. You can pass NULL or an empty string for this parameter when you already are passing in the sequence context or when you do not want the Resource Usage Profiler to account for this operation.