Click here to Skip to main content
14,668,412 members
Articles » Platforms, Frameworks & Libraries » .NET Framework » How To » Revisions

Stats

9.4K views
145 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.

Revisions


  

Compare Revision Minor Date Status Editor
10 - publicly available Yes 25-Jul-20 16:29 Available honey the codewitch
Updates in content. Changes: 11
2 No 24-Jul-20 13:30 Available honey the codewitch
Updates in content. Changes: 3746

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