However, with ASP.NET Web Api, if your request is coming in on one thread, and you await some function and call
ConfigureAwait(false)
What's am I missing here?
You are missing compiler warnings
Warning CS1998 This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
The method foo
isn't really asynchronous as there are no await
calls in it.
Try adding await Task.Delay
in there.