How to Async.AwaitTask on plain Task (not Task)?

You can use ContinueWith:

let awaitTask (t: Task) = t.ContinueWith (fun t -> ()) |> Async.AwaitTask

Or AwaitIAsyncResult with infinite timeout:

let awaitTask (t: Task) = t |> Async.AwaitIAsyncResult |> Async.Ignore

Leave a Comment