F# how to run several asynchrous tasks and wait for result of first completed?

Viewed 2365

There are many examples how to execute async tasks in f# like

[dowork 1; work 2]
|> Async.Parallel
|> Async.RunSynchronously

But how I can asynchronously wait for only the first result?

For example if I want to run some parallel look up tasks and I want to search deeper when the first successful result is obtained. (Basically the equivalent as Task.WhenAny in the C# world...)

5 Answers
Related