RosettaCodeData/Task/Determine-if-only-one-instance-is-running/Mathematica/determine-if-only-one-instance-is-running.math
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

5 lines
158 B
Text

$Epilog := Print["Another instance is running "];
If[Attributes[Global`Mutex] == {Protected},
Exit[],
Global`Mutex[x_] := Locked; Protect[Global`Mutex];
]