UnsetShared
This feature is not supported on the Wolfram Cloud.

UnsetShared[s1,s2,]
stops the sharing of the variables or functions among parallel kernels.

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

DetailsDetails

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

ExamplesExamplesopen allclose all

Basic Examples  (2)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]=
Introduced in 2008
(7.0)