|ScopedLockType (InterProcessLock &l)|
|Creates a scoped lock. |
|bool||isLocked () const noexcept|
|Returns true if the InterProcessLock was successfully locked. |
Automatically locks and unlocks an InterProcessLock object.
This works like a ScopedLock, but using an InterprocessLock rather than a CriticalSection.
Creates a scoped lock.
Note that since an InterprocessLock can fail due to errors, you should check isLocked() to make sure that the lock was successful before using it.
Make sure this object is created and deleted by the same thread, otherwise there are no guarantees what will happen! Best just to use it as a local stack object, rather than creating one with the new() operator.
The InterProcessLock will be unlocked when the destructor is called.
Make sure this object is created and deleted by the same thread, otherwise there are no guarantees what will happen!
Returns true if the InterProcessLock was successfully locked.