Provides a cross-process object allowing easy detection of application instances (e.g., for use by installers and update tools). May be a no-op on some platforms.
More...
|
void | Close () |
| Closes the mutex handle, allowing it to be released if no other instances are running. More...
|
|
|
static AppMutex | Create ([Localizable(false)] string name) |
| Creates or opens a mutex to signal that an application is running. More...
|
|
static bool | Probe ([Localizable(false)] string name) |
| Checks whether a specific mutex exists (local or global) without opening a lasting handle. More...
|
|
Provides a cross-process object allowing easy detection of application instances (e.g., for use by installers and update tools). May be a no-op on some platforms.
Use Mutex or MutexLock instead for synchronizing access to shared resources.
◆ Close()
void NanoByte.Common.AppMutex.Close |
( |
| ) |
|
|
inline |
Closes the mutex handle, allowing it to be released if no other instances are running.
◆ Create()
static AppMutex NanoByte.Common.AppMutex.Create |
( |
[Localizable(false)] string |
name | ) |
|
|
inlinestatic |
Creates or opens a mutex to signal that an application is running.
- Parameters
-
name | The name to be used as a mutex identifier. |
- Returns
- The handle for the mutex. Can be used to Close it again. Will automatically be released once the process terminates.
◆ Probe()
static bool NanoByte.Common.AppMutex.Probe |
( |
[Localizable(false)] string |
name | ) |
|
|
inlinestatic |
Checks whether a specific mutex exists (local or global) without opening a lasting handle.
- Parameters
-
name | The name to be used as a mutex identifier. |
- Returns
true
if an existing mutex was found; false
if none existed.
The documentation for this class was generated from the following file: