[docs] Better describe difference role of @spawn in multithreading
#37,011 创建于 2020年8月12日
仓库指标
- Star
- (48,709 star)
- PR 合并指标
- (平均合并 20天 6小时) (30 天内合并 157 个 PR)
描述
https://docs.julialang.org/en/v1/base/multi-threading/#Base.Threads.@spawn says See the manual chapter on threading for important caveats. but in https://docs.julialang.org/en/v1/manual/multi-threading/ the @spawn macro is not used in any bigger example, not elaborated in more detail.
Difference and similarity of @async and @spawn should be elaborated more, ideally with demonstration of both @async and @spawn being used with @sync.
In https://docs.julialang.org/en/v1/base/parallel/#Base.@sync I see it can be used for @spawn too, but I think actually having example in manual would help much.
Some related discussion here: https://julialang.slack.com/archives/C6SMTHQ3T/p1597182853179500