declares the symbols fi as shared functions whose downvalues are synchronized among all parallel kernels.
- Downvalues for a shared function defined on any kernel are maintained by the master kernel and every access on a parallel subkernel is synchronized through the master kernel.
- Expressions of the form f[…] that would remain unevaluated give Null.
Examplesopen allclose all
Basic Examples (1)
Generalizations & Extensions (1)
Properties & Relations (1)
Using AppendTo on a shared variable has the same effect:
Possible Issues (3)
Alternatively, use CriticalSection to make a whole code section atomic:
Neat Examples (1)
A parallel version of Sow: