Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions base/task.jl
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,14 @@ Values can be interpolated into `@async` via `\$`, which copies the value direct
constructed underlying closure. This allows you to insert the _value_ of a variable,
isolating the asynchronous code from changes to the variable's value in the current task.

!!! warning
It is strongly encouraged to favor `Threads.@spawn` over `@async` always **even when no
parallelism is required** especially in publicly distributed libraries. This is
because a use of `@async` disables the migration of the *parent* task across worker
threads in the current implementation of Julia. Thus, seemingly innocent use of
`@async` in a library function can have a large impact on the performance of very
different parts of user applications.

!!! compat "Julia 1.4"
Interpolating values via `\$` is available as of Julia 1.4.
"""
Expand Down