Supponendo che ho queste due funzioni:F # utilizzando Async.Parallel per eseguire compiti in parallelo 2
let dowork n =
async {
do printfn "work %d" n
}
let work i = async {
do! Async.Sleep(2000)
printfn "work finished %d" i }
Come dovrei usare Async.Parallel per eseguirli contemporaneamente e attendere che sia di finire prima di procedere?
possibili dups, http://stackoverflow.com/questions/5693279/combining-f- async-functions, http://stackoverflow.com/questions/4106846/how-to-wait-for-async-to-finish – gradbot