Task.WaitAsync Method

Definition

Overloads

WaitAsync(TimeSpan, CancellationToken)
WaitAsync(TimeSpan)
WaitAsync(CancellationToken)

WaitAsync(TimeSpan, CancellationToken)

public:
 System::Threading::Tasks::Task ^ WaitAsync(TimeSpan timeout, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task WaitAsync (TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.WaitAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function WaitAsync (timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

timeout
TimeSpan
cancellationToken
CancellationToken

Returns

Task

Applies to

WaitAsync(TimeSpan)

public:
 System::Threading::Tasks::Task ^ WaitAsync(TimeSpan timeout);
public System.Threading.Tasks.Task WaitAsync (TimeSpan timeout);
member this.WaitAsync : TimeSpan -> System.Threading.Tasks.Task
Public Function WaitAsync (timeout As TimeSpan) As Task

Parameters

timeout
TimeSpan

Returns

Task

Applies to

WaitAsync(CancellationToken)

public:
 System::Threading::Tasks::Task ^ WaitAsync(System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task WaitAsync (System.Threading.CancellationToken cancellationToken);
member this.WaitAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function WaitAsync (cancellationToken As CancellationToken) As Task

Parameters

cancellationToken
CancellationToken

Returns

Task

Applies to