Skip to content

Commit a8d42eb

Browse files
dhivyasreedharvtjnashfredrikekre
authored
Improve documentation for JULIA_NUM_THREADS=auto (#42501)
Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Fredrik Ekre <[email protected]>
1 parent b483c6d commit a8d42eb

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

doc/src/base/multi-threading.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Base.Threads.threadid
88
Base.Threads.nthreads
99
```
1010

11+
See also [Multi-Threading](@ref man-multithreading).
1112
## Synchronization
1213

1314
```@docs

doc/src/manual/multi-threading.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@ The number of execution threads is controlled either by using the
1818
[`JULIA_NUM_THREADS`](@ref JULIA_NUM_THREADS) environment variable. When both are
1919
specified, then `-t`/`--threads` takes precedence.
2020

21+
The number of threads can either be specified as an integer (`--threads=4`) or as `auto`
22+
(`--threads=auto`), where `auto` sets the number of threads to the number of local CPU
23+
threads.
24+
2125
!!! compat "Julia 1.5"
2226
The `-t`/`--threads` command line argument requires at least Julia 1.5.
2327
In older versions you must use the environment variable instead.
2428

29+
!!! compat "Julia 1.7"
30+
Using `auto` together with the environment variable `JULIA_NUM_THREADS` requires at least Julia 1.7.
2531
Lets start Julia with 4 threads:
2632

2733
```bash

0 commit comments

Comments
 (0)