49 explicit Lock(
QtSync* sync,
bool tryLock =
false,
int timeout = -1)
50 : _mutex(sync->_mutex)
53 _locked = lock(tryLock, timeout);
68 inline explicit operator bool()
const
79 [[nodiscard]]
bool lock(
bool tryLock =
false,
int timeout = -1);
Class locking the mutex.
Definition QtSync.h:44
Lock(QtSync *sync, bool tryLock=false, int timeout=-1)
Locks the QMutex object in the QSync object.
Definition QtSync.h:49
~Lock()
Destructor unlocking when locked.
Definition QtSync.h:59
bool lock(bool tryLock=false, int timeout=-1)
Used when try locking the sync/mutex.
void unlock()
Unlocks the mutex.
Definition QtSync.h:84
QSync provides a interface to build classes that act like monitors.
Definition QtSync.h:14
QtSync & operator=(const QtSync &)
Does not copy the Mutex object, since the new object is not being used in any of its own member funct...
Definition QtSync.h:34
QtSync()=default
Only by inheritance is allowed to create this instance.
QtSync(const QtSync &)
Copy constructor does not copy the Mutex object, since the new object is not being used in any of its...
Definition QtSync.h:27
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10