Platforms to show: All Mac Windows Linux Cross-Platform
Back to NamedMutexMBS class.
NamedMutexMBS.Constructor(Name as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 20.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Name should be a simple text, but unique, so we recommend reverse domain notation.
The name should not contain a slash.
If mutex exists already, we open it. The mutex lives until the last application closed it.
If name matches the name of an existing event, semaphore, waitable timer, job, or file-mapping object, the function fails.
Raises an UnsupportedOperationException on failure.
You can open the same mutex twice and get different Xojo objects from the plugin for both.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 20.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Blocks until mutex is locked.
Please call Unlock later to unlock.
To avoid you looking up the app, we limit locking to one minute. After that you get a timeout error.
NamedMutexMBS.TryLock as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 20.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true if locked or false if the lock can't be set.
If false is returned another app may have a lock currently.
Please call Unlock later to unlock if you get back true.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 20.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The items on this page are in the following plugins: MBS Util Plugin.