public static Mutex GetNamedMutex(
string name,
bool global = true
)
Public Shared Function GetNamedMutex (
name As String,
Optional global As Boolean = true
) As Mutex
public:
static Mutex^ GetNamedMutex(
String^ name,
bool global = true
)
Gemstone.Threading.InterprocessLock.GetNamedMutex = function(name, global);
This function uses a hash of the name when creating the Mutex, not the actual name - this way restrictions on the name length do not need to be a user concern. All processes needing an inter-process Mutex need to use this same function to ensure access to the same Mutex.
The name can be a string of any length (must not be empty, null or white space) and is not case-sensitive. All hashes of the name used to create the global Mutex are first converted to lower case.
ArgumentNullException | Argument name cannot be empty, null or white space. |
UnauthorizedAccessException | The named mutex exists, but the user does not have the minimum needed security access rights to use it. |