I am using a library which has been written in C# and uses the async/await pattern. In C# I can await something by calling it with ConfigureAwait(false)
but when I use the library from F# I don't see a way of doing the same thing?
Currently I do SomeMethodAsync() |> Async.AwaitTask
to convert it into an Async
F# workflow, but how can I do the same as ConfigureAwait(false)
from F# as well when calling SomeMethodAsync
?
EDIT:
With some awesome help in the F# Slack channel and some additional googling I found a good explanation of how to switch context here: http://tomasp.net/blog/async-non-blocking-gui.aspx/