JuliaLang/julia

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

Open

#37.011 aperta il 12 ago 2020

Vedi su GitHub
 (0 commenti) (3 reazioni) (0 assegnatari)Julia (5773 fork)batch import
docshelp wantedmultithreading

Metriche repository

Star
 (48.709 star)
Metriche merge PR
 (Merge medio 20g 6h) (157 PR mergiate in 30 g)

Descrizione

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

Guida contributor