JuliaLang/julia

[docs] Better describe difference role of @spawn in multithreading

Open

#37,011 创建于 2020年8月12日

在 GitHub 查看
 (0 评论) (3 反应) (0 负责人)Julia (5,773 fork)batch import
docshelp wantedmultithreading

仓库指标

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

贡献者指南