Closed slang25 closed 6 years ago
This is correct
It's not that it won't work inside the awaited method, it's that calls below within the same async method will run with a null context.
Let me create a sample to be clear
@benaadams See here:
https://github.com/slang25/Ben.BlockingDetector/blob/await-example/src/Ben.BlockingDetector.Sample/Controllers/HomeController.cs#L24
When you remove the first await
, the detection works.
Should now even catch moving off the sync context for Tasks; though it won't catch Monitor.Wait
etc if you do; so not removing the caveat just yet
https://github.com/benaadams/Ben.BlockingDetector/commit/d651e390011eeecbd4328b6cdc4d0bb365d44c0e#r26963867 I'm enjoying "Tips of the Toub"
I'm enjoying "Tips of the Toub"
@stephentoub's the bringer of magic
Please close if I am incorrect. This library requires that this sync context is flowed through the code.