Found the following (from 2014!!) after banging my head against the wall for 3×4 hours …. in 2 projects. This explains a lot and I am not sure that all developers are aware of this deadlock? Or am I the only one? 🙂 So back to work!!
—— FORUM POST BEGINS ———
Ok, discovered the answer the hard way after 2 days of tracing and breakpointing. In a nutshell, you can’t call an asynchronous method
from a method that blocks
as it causes a deadlock to occur when method2 attempts to return execution to the caller.
—— FORUM POST ENDS ———
… and so, I decided to refresh my Task thinking with this excellent beginners guide to threading in c#. Good stuff.