CountDownLatch.AwaitAsync Method

Definition

Overloads

Name Description
AwaitAsync()

Asynchronously waits until the latch count reaches zero.

AwaitAsync(Int64, TimeUnit)

Asynchronously waits until the latch count reaches zero or the specified waiting time elapses.

AwaitAsync()

Asynchronously waits until the latch count reaches zero.

public System.Threading.Tasks.Task AwaitAsync();
member this.AwaitAsync : unit -> System.Threading.Tasks.Task

Returns

A task that completes when the latch count reaches zero.

Remarks

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

AwaitAsync(Int64, TimeUnit)

Asynchronously waits until the latch count reaches zero or the specified waiting time elapses.

public System.Threading.Tasks.Task<bool> AwaitAsync(long timeout, Java.Util.Concurrent.TimeUnit? unit);
member this.AwaitAsync : int64 * Java.Util.Concurrent.TimeUnit -> System.Threading.Tasks.Task<bool>

Parameters

timeout
Int64

The maximum time to wait.

unit
TimeUnit

The time unit of timeout.

Returns

A task whose result is true if the count reaches zero before the waiting time elapses; otherwise, false.

Remarks

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