UnsetShared

UnsetShared[s1,s2,]

stops the sharing of the variables or functions si among parallel kernels.

UnsetShared[patt]

stops the sharing of all variables and functions whose names match the string pattern patt.

Details

  • UnsetShared["*"] stops sharing of all currently shared variables and functions.

Examples

Basic Examples  (2)

Declare a shared variable:

In[1]:=
Click for copyable input

All accesses are synchronized:

In[2]:=
Click for copyable input
Out[2]=

Stop sharing the variable:

In[3]:=
Click for copyable input
Out[3]=

The value on the master kernel remains:

In[4]:=
Click for copyable input
Out[4]=

The variables on the subkernels are no longer synchronized:

In[5]:=
Click for copyable input
Out[5]=

Stop sharing all variables and functions:

In[1]:=
Click for copyable input
Out[1]=

See Also

SetSharedVariable  SetSharedFunction  $SharedVariables  $SharedFunctions

Introduced in 2008
(7.0)