Semaphore.AcquireSemaphore
- Aktualisiert2025-07-21
- 1 Minute(n) Lesezeit
Semaphore.AcquireSemaphore
Syntax
Semaphore.AcquireSemaphore( timeoutInSeconds, sequenceContextObj, processMsgs, waitRes)
Purpose
Performs an Acquire (decrement) operation on the semaphore.
Parameters
timeoutInSeconds As Double
[In] Specifies a timeout in seconds. Pass a negative number to specify that you do not want a time out.
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. The semaphore uses the sequence context to improve the behavior of the execution when it is blocked while waiting on the semaphore.
processMsgs As Boolean
[In] Pass True to process Microsoft Windows messages while waiting to acquire the semaphore. When you call this method from an execution, pass True for this parameter. Otherwise, pass False .
waitRes As WaitResult
[Out] Returns the status of the Acquire operation.