Share via


Semaphore.ReducePermits(Int32) Method

Definition

Shrinks the number of available permits by the indicated reduction.

[Android.Runtime.Register("reducePermits", "(I)V", "GetReducePermits_IHandler")]
protected virtual void ReducePermits (int reduction);
[<Android.Runtime.Register("reducePermits", "(I)V", "GetReducePermits_IHandler")>]
abstract member ReducePermits : int -> unit
override this.ReducePermits : int -> unit

Parameters

reduction
Int32

the number of permits to remove

Attributes

Exceptions

if reduction is negative

Remarks

Shrinks the number of available permits by the indicated reduction. This method can be useful in subclasses that use semaphores to track resources that become unavailable. This method differs from acquire in that it does not block waiting for permits to become available.

Java documentation for java.util.concurrent.Semaphore.reducePermits(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to