Java.Util.Concurrent.CountDownLatch.Await Method
Causes the current thread to wait until the latch has counted down to zero, unless the thread is Java.Lang.Thread.Interrupt, or the specified waiting time elapses.

Syntax

[Android.Runtime.Register("await", "(JLjava/util/concurrent/TimeUnit;)Z", "GetAwait_JLjava_util_concurrent_TimeUnit_Handler")]
public virtual bool Await (long timeout, TimeUnit unit)

Parameters

timeout
the maximum time to wait
unit
the time unit of the timeout argument

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.InterruptedExceptionif the current thread is interrupted while waiting

Remarks

Causes the current thread to wait until the latch has counted down to zero, unless the thread is Java.Lang.Thread.Interrupt, or the specified waiting time elapses.

If the current count is zero then this method returns immediately with the value true.

If the current count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happen:

If the count reaches zero then the method returns with the value true.

If the current thread:

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

If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all.

[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