ConfigureAwait
works in places where there is a synchronization context.await
breaks the code into two parts using a state machine and the second part (continuation) is posted to thePost
method of the synchronization context.- Having your own synchronization context, you can control where to invoke the continuation.
- This example puts the continuations to a queue and has a worker that dequeues continuations and invokes them.
- The worker runs on the main thread.
- Having
ConfigureAwait(true)
tells the program to use the same synchronization context for the continuation. - If set to
ConfigureAwait(false)
the synchronization context will not be used.
-
Notifications
You must be signed in to change notification settings - Fork 0
timurgaitov/ConfigureAwait
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published