Primer on migrating from `Async` to `Task` in F# 6
Quick primer mapping common F# `Async` functions to the newly supported `Task` functions in F# 6 / .net6.
Async | Task | Note |
---|---|---|
Async.RunSynchronously | task.result | Calling .result on a Task instance will block the current thread until the task completes. |
Async.Parallel | Task.WhenAll | |
Async.Choose | Task.WhenAny | |
Async.StartAsTask | Not needed | |
Async.AwaitTask | Not needed |
For more changes in F# 6 check out https://www.youtube.com/watch?v=jOrgDoMuFog