Reputation: 4517
It is widely known that blocking on async code is a bad idea. As shown here and numerous other places. http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html
But if using a third party library that does this anyway, is there a way to isolate the problem by providing a proper synchronization context or another fix without rewriting the library.
The offender in this case is: https://github.com/launchdarkly/.net-client/blob/master/src/LaunchDarkly.Client/FeatureRequestor.cs and it seems to be causing us some problems.
Upvotes: 0
Views: 99
Reputation: 14334
My recommendation is to call into the library from a worker thread.
This will provide the library with the default synchronization context and will no longer marshal to a single thread.
This is not a recommended workaround but it should do the trick.
Upvotes: 1