Skip to content

Commit bff96e2

Browse files
authored
Clarification on workers vs. processes (#35633)
Restored from #33649
1 parent c194a21 commit bff96e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/src/manual/distributed-computing.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ co-ordinate their processing by referencing the same remote `Channel`.
3838
Each process has an associated identifier. The process providing the interactive Julia prompt
3939
always has an `id` equal to 1. The processes used by default for parallel operations are referred
4040
to as "workers". When there is only one process, process 1 is considered a worker. Otherwise,
41-
workers are considered to be all processes other than process 1.
41+
workers are considered to be all processes other than process 1. As a result, adding 2 or more
42+
processes is required to gain benefits from parallel processing methods like [`pmap`](@ref). Adding
43+
a single process is beneficial if you just wish to do other things in the main process while a long
44+
computation is running on the worker.
4245

4346
Let's try this out. Starting with `julia -p n` provides `n` worker processes on the local machine.
4447
Generally it makes sense for `n` to equal the number of CPU threads (logical cores) on the machine. Note that the `-p`

0 commit comments

Comments
 (0)