Click here to Skip to main content
14,663,904 members
Articles » Platforms, Frameworks & Libraries » .NET Framework » How To » Statistics

Stats

9.2K views
144 downloads
41 bookmarked

How to Use the C# Await Keyword on Anything

Rate this:
4.91 (27 votes)
Please Sign up or sign in to vote.
4.91 (27 votes)
24 Jul 2020MIT
Using await in scenarios where you want to await custom items with or without using Task.Run()
Await can be used on things other than Task objects - it's simply a matter of implementing the members the compiler wants. Here, I endeavor to explain how to await anything using custom awaitable objects and also using TaskAwaiter.

Views

Downloads

License

This article, along with any associated source code and files, is licensed under The MIT License

Share

About the Author

honey the codewitch
United States United States
Just a shiny lil monster. Casts spells in C++. Mostly harmless.

Comments and Discussions