A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/dotnet/api/system.threading.tasks.task.waitasync below:

Task.WaitAsync Method (System.Threading.Tasks) | Microsoft Learn

Task.WaitAsync Method Definition Overloads WaitAsync(CancellationToken)
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs
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 Returns

The Task representing the asynchronous wait. It may or may not be the same instance as the current instance.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Wait().

WaitAsync(TimeSpan)
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs

Gets a Task that will complete when this Task completes or when the specified timeout expires.

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 Returns

The Task representing the asynchronous wait. It may or may not be the same instance as the current instance.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Wait(TimeSpan).

WaitAsync(TimeSpan, CancellationToken)
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs

Gets a Task that will complete when this Task completes, when the specified timeout expires, or when the specified CancellationToken has cancellation requested.

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 Returns

The Task representing the asynchronous wait. It may or may not be the same instance as the current instance.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Wait(TimeSpan).

WaitAsync(TimeSpan, TimeProvider)
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs

Gets a Task that will complete when this Task completes or when the specified timeout expires.

public:
 System::Threading::Tasks::Task ^ WaitAsync(TimeSpan timeout, TimeProvider ^ timeProvider);
public System.Threading.Tasks.Task WaitAsync(TimeSpan timeout, TimeProvider timeProvider);
member this.WaitAsync : TimeSpan * TimeProvider -> System.Threading.Tasks.Task
Public Function WaitAsync (timeout As TimeSpan, timeProvider As TimeProvider) As Task
Parameters Returns

The Task representing the asynchronous wait. It may or may not be the same instance as the current instance.

Exceptions

The timeProvider argument is null.

WaitAsync(TimeSpan, TimeProvider, CancellationToken)
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs

Gets a Task that will complete when this Task completes, when the specified timeout expires, or when the specified CancellationToken has cancellation requested.

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

The Task representing the asynchronous wait. It may or may not be the same instance as the current instance.

Exceptions

The timeProvider argument is null.

The timeout expired. This exception is stored into the returned task.

The cancellation token was canceled. This exception is stored into the returned task.

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4