Java.Util.Concurrent.Semaphore.Acquire Method
Acquires a permit from this semaphore, blocking until one is available, or the thread is Java.Lang.Thread.Interrupt.

Syntax

[Android.Runtime.Register("acquire", "()V", "GetAcquireHandler")]
public virtual void Acquire ()

Exceptions

TypeReason
Java.Lang.InterruptedExceptionif the current thread is interrupted

Remarks

Acquires a permit from this semaphore, blocking until one is available, or the thread is Java.Lang.Thread.Interrupt.

Acquires a permit, if one is available and returns immediately, reducing the number of available permits by one.

If no permit is available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happens:

If the current thread:

then Java.Lang.InterruptedException is thrown and the current thread's interrupted status is cleared.

[Android Documentation]

Requirements

Namespace: Java.Util.Concurrent
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1