Java.Util.Concurrent.Semaphore.AcquireUninterruptibly Method
Acquires the given number of permits from this semaphore, blocking until all are available.

Syntax

[Android.Runtime.Register("acquireUninterruptibly", "(I)V", "GetAcquireUninterruptibly_IHandler")]
public virtual void AcquireUninterruptibly (int permits)

Parameters

permits
the number of permits to acquire

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif permits is negative

Remarks

Acquires the given number of permits from this semaphore, blocking until all are available.

Acquires the given number of permits, if they are available, and returns immediately, reducing the number of available permits by the given amount.

If insufficient permits are available then the current thread becomes disabled for thread scheduling purposes and lies dormant until some other thread invokes one of the Semaphore.Release methods for this semaphore, the current thread is next to be assigned permits and the number of available permits satisfies this request.

If the current thread is Java.Lang.Thread.Interrupt while waiting for permits then it will continue to wait and its position in the queue is not affected. When the thread does return from this method its interrupt status will be set.

[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