You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/stdlib/parallel.rst
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -502,7 +502,20 @@ General Parallel Computing Support
502
502
503
503
.. Docstring generated from Julia source
504
504
505
-
Execute an expression on all processes. Errors on any of the processes are collected into a ``CompositeException`` and thrown.
505
+
Execute an expression on all processes. Errors on any of the processes are collected into a ``CompositeException`` and thrown. For example :
506
+
507
+
.. code-block:: julia
508
+
509
+
@everywhere bar=1
510
+
511
+
will define ``bar`` under module ``Main`` on all processes.
512
+
513
+
Unlike ``@spawn`` and ``@spawnat``\ , ``@everywhere`` does not capture any local variables. Prefixing ``@everywhere`` with ``@eval`` allows us to broadcast local variables using interpolation :
0 commit comments