Skip to content

Commit acea524

Browse files
add note about @threads threadpool
1 parent 829666d commit acea524

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

base/threadingconstructs.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,14 @@ A macro to execute a `for` loop in parallel. The iteration space is distributed
287287
coarse-grained tasks. This policy can be specified by the `schedule` argument. The
288288
execution of the loop waits for the evaluation of all iterations.
289289
290+
Tasks spawned by `@threads` are scheduled on the `:default` threadpool. This means that
291+
`@threads` will not use threads from the `:interactive` threadpool, even if called from
292+
the main thread or from a task in the interactive pool. The `:default` threadpool is
293+
intended for compute-intensive parallel workloads.
294+
290295
See also: [`@spawn`](@ref Threads.@spawn) and
291296
`pmap` in [`Distributed`](@ref man-distributed).
297+
For more information on threadpools, see the chapter on [threadpools](@ref man-threadpools).
292298
293299
# Extended help
294300

0 commit comments

Comments
 (0)