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

貢獻者指南