From 8425b0ea03a4cbf4cfb677fb554b19d6a5a0eb03 Mon Sep 17 00:00:00 2001 From: Carsten Bauer Date: Wed, 21 Feb 2024 21:33:54 +0100 Subject: [PATCH] Fix documentation: thread pool of main thread (#53388) See https://github.com/JuliaLang/julia/issues/53217#issuecomment-1930891907 --- doc/src/manual/multi-threading.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/src/manual/multi-threading.md b/doc/src/manual/multi-threading.md index 085c6b835c87c..dd02da8798f06 100644 --- a/doc/src/manual/multi-threading.md +++ b/doc/src/manual/multi-threading.md @@ -116,8 +116,8 @@ julia> using Base.Threads julia> nthreadpools() 2 -julia> threadpool() -:default +julia> threadpool() # the main thread is in the interactive thread pool +:interactive julia> nthreads(:default) 3 @@ -133,6 +133,10 @@ julia> nthreads() The zero-argument version of `nthreads` returns the number of threads in the default pool. +!!! note + Depending on whether Julia has been started with interactive threads, + the main thread is either in the default or interactive thread pool. + Either or both numbers can be replaced with the word `auto`, which causes Julia to choose a reasonable default.