Acquires a permit from this semaphore, if one becomes available
                within the given waiting time and the current thread has not
                been interrupted.
            
Namespace: Hazelcast.Core
Assembly: Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.8.2
Syntax
Parameters
- timeout
- Type: SystemInt64
 the maximum time to wait for a permit
- unit
- Type: Hazelcast.CoreTimeUnit
 the time unit of the timeout argument
Return Value
Type: Booleantrue if a permit was acquired and false if the waiting time elapsed before a permit was acquired
Exceptions
| Exception | Condition | 
|---|---|
| Exception | if the current thread is interrupted | 
| InvalidOperationException | if hazelcast instance is shutdown while waiting | 
Remarks
- Some other thread invokes the Release() method for this semaphore and the current thread is next to be assigned a permit; or
- Some other thread interrupts the current thread; or
- The specified waiting time elapses.
See Also
