Compartilhar via


Semaphore.AvailablePermits Method

Definition

Returns the current number of permits available in this semaphore.

[Android.Runtime.Register("availablePermits", "()I", "GetAvailablePermitsHandler")]
public virtual int AvailablePermits ();
[<Android.Runtime.Register("availablePermits", "()I", "GetAvailablePermitsHandler")>]
abstract member AvailablePermits : unit -> int
override this.AvailablePermits : unit -> int

Returns

the number of permits available in this semaphore

Attributes

Remarks

Returns the current number of permits available in this semaphore.

This method is typically used for debugging and testing purposes.

Java documentation for java.util.concurrent.Semaphore.availablePermits().

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