File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -467,6 +467,14 @@ Values can be interpolated into `@async` via `\$`, which copies the value direct
467467constructed underlying closure. This allows you to insert the _value_ of a variable,
468468isolating the asynchronous code from changes to the variable's value in the current task.
469469
470+ !!! warning
471+ It is strongly encouraged to favor `Threads.@spawn` over `@async` always **even when no
472+ parallelism is required** especially in publicly distributed libraries. This is
473+ because a use of `@async` disables the migration of the *parent* task across worker
474+ threads in the current implementation of Julia. Thus, seemingly innocent use of
475+ `@async` in a library function can have a large impact on the performance of very
476+ different parts of user applications.
477+
470478!!! compat "Julia 1.4"
471479 Interpolating values via `\$ ` is available as of Julia 1.4.
472480"""
You can’t perform that action at this time.
0 commit comments