-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Should ConfigureAwait(false) be called in NancyHost? #2471
Comments
Since NancyHost is the consumer of the task it does need to capture context. |
Probably should be called from everywhere. Explicit or assembly rewrite with a Fody plugin? On 25 Aug 2016 12:51 p.m., "Andreas Håkansson" [email protected] @khellang https://github.com/khellang @damianh — |
I think line 133 should have a CAF. |
Been out of the loop a bit, but would adding that |
What if you host by something else? On 30 August 2016 at 12:41, Andreas Håkansson [email protected]
|
Well Nancy is a library and if you consume it yourself you are subjected to following the laws of async, thus making sure you properly do your own |
You are thinking about this in the correct way :) |
@damianh so we should get this in, right? |
Yep! On 30 Aug 2016 2:45 p.m., "Andreas Håkansson" [email protected]
|
Oh wait.. this is an issue, not a pull-request.. @xt0rted mind sending a PR and I'll get it in asap? |
While looking through the code and using the ReSharper ConfigureAwait Checker plugin I came across Nancy.Hosting.Self/NancyHost.cs#L133-134.
Should line 133 and/or 134 call
.ConfigureAwait(false)
? The other warning I'm getting is on line 134 because it's not awaited but I wasn't sure if that should be or not.Those are the only two spots outside of the test projects that don't call ConfigureAwait.
The text was updated successfully, but these errors were encountered: