开发者

Async.Parallel, grouping work of many works

开发者 https://www.devze.com 2023-01-31 15:11 出处:网络
Is a pattern like: seq[ workSeq, workSeq ..., workSeq, workSeq] |> Seq.map( Async.Parallel ) |> Async.Parallel

Is a pattern like:

seq[ workSeq, workSeq ..., workSeq, workSeq]
|> Seq.map( Async.Parallel )
|> Async.Parallel
|> Async.开发者_开发技巧RunSynchronously

ok?, Or do i have to do:

seq[ workSeq, workSeq ..., workSeq, workSeq]
|> Seq.concat
|> Async.Parallel
|> Async.RunSynchronously

How do these two options behave differently ?

Thanks


One does a single fork-join among all the tiny pieces of work, whereas the other does a fork-join over a group of other fork-join batches. Which behavior do you intend? The former seems more likely to be useful to me... So I would probably do the concat.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号