From https://msdn.microsoft.com/en-us/library/mt674882.aspx#Threads:
The async-based approach to asynchronous programming is preferable to existing approaches in almost every case. In particular, this approach is better than BackgroundWorker for IO-bound operations because the code is simpler and you don't have to guard against race conditions. In combination with Task.Run, async programming is better than BackgroundWorker for CPU-bound operations because async programming separates the coordination details of running your code from the work that Task.Run transfers to the threadpool.
It seems to me that a chain of async functions must eventually end in waiting for something to happen that is outside of your program's control. Some Internet download or user input or something.
What about situations when your program must perform some lengthy calculation? It would have to be in a method that doesn't itself use await, because there's nothing to wait for when it's doing all the work itself. If await is not used then control wouldn't return back to the calling function, correct? If that's the case then surely it's not even asynchronous at all.
It seems BackgroundWorker is well-suited for lengthy calculations: https://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx#Examples
Is there any way to use async/await for that purpose?
BackgroundWorkerusage can be converted to a few or a singleTaskand then you can await on them.