A RetroSearch Logo

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

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.configureawait below:

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

Task.ConfigureAwait Method Definition Overloads ConfigureAwait(Boolean)
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs

Configures an awaiter used to await this Task.

public:
 System::Runtime::CompilerServices::ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext);
public System.Runtime.CompilerServices.ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext);
member this.ConfigureAwait : bool -> System.Runtime.CompilerServices.ConfiguredTaskAwaitable
Public Function ConfigureAwait (continueOnCapturedContext As Boolean) As ConfiguredTaskAwaitable
Parameters
continueOnCapturedContext
Boolean

true to attempt to marshal the continuation back to the original context captured; otherwise, false.

Returns

An object used to await this task.

Remarks

When an asynchronous method awaits a Task directly, continuation usually occurs in the same thread that created the task, depending on the async context. This behavior can be costly in terms of performance and can result in a deadlock on the UI thread. To avoid these problems, call Task.ConfigureAwait(false). For more information, see ConfigureAwait FAQ.

See also ConfigureAwait(ConfigureAwaitOptions)
Source:
Task.cs
Source:
Task.cs
Source:
Task.cs

Configures an awaiter used to await this Task.

public:
 System::Runtime::CompilerServices::ConfiguredTaskAwaitable ConfigureAwait(System::Threading::Tasks::ConfigureAwaitOptions options);
public System.Runtime.CompilerServices.ConfiguredTaskAwaitable ConfigureAwait(System.Threading.Tasks.ConfigureAwaitOptions options);
member this.ConfigureAwait : System.Threading.Tasks.ConfigureAwaitOptions -> System.Runtime.CompilerServices.ConfiguredTaskAwaitable
Public Function ConfigureAwait (options As ConfigureAwaitOptions) As ConfiguredTaskAwaitable
Parameters Returns

An object used to await this task.

Exceptions

The options argument specifies an invalid value.

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