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
true
to attempt to marshal the continuation back to the original context captured; otherwise, false
.
An object used to await this task.
RemarksWhen 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.
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.
ExceptionsThe 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 articleWas 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