datalust / seq-api

HTTP API client for Seq
https://datalust.co/seq
Apache License 2.0
78 stars 21 forks source link

Don't attempt to marshal the continuation back to the original context captured #11

Closed bbrandt closed 8 years ago

bbrandt commented 8 years ago

Hi Nick,

This commit updates Seq.Api to follow best practice of calling ConfigureAwait(false) for non-UI libraries/non-top level code. At the top level code, like SeqTail, a developer would NOT specify ConfigureAwait(false) and the continuation of the async method would be marshaled back to the synchronization context captured before the await.

Here's some references: Async/Await - Best Practices in Asynchronous Programming Preventing the Deadlock Stackoverflow

nblumhardt commented 8 years ago

Excellent, thanks!