Acquires the given number of permits, if they are available,
and returns immediately, reducing the number of available permits
by the given amount.
Namespace: Hazelcast.Core
Assembly: Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9.1
Syntax
Parameters
- permits
- Type: SystemInt32
the number of permits to acquire
Exceptions
Exception | Condition |
---|---|
ArgumentException | if permits is negative |
InvalidOperationException | if hazelcast instance is shutdown while waiting |
Remarks
- Some other thread invokes one of the release methods for this semaphore, the current thread is next to be assigned permits and the number of available permits satisfies this request;
- This ISemaphore instance is destroyed;
See Also