QMutexLocker - locking question
-
wrote on 2 Jan 2020, 10:54 last edited by
Hey
So I have a
QMutexLocker l(&mLock);
When this function gets called and mLock is already locked by another thread. What happens?
- The program stops & try-lock/wait forever until he can access the mutex to lock it?
- The program stops and does nothing.
I'm trying to debug app locks :- )
TIA!
-
Hey
So I have a
QMutexLocker l(&mLock);
When this function gets called and mLock is already locked by another thread. What happens?
- The program stops & try-lock/wait forever until he can access the mutex to lock it?
- The program stops and does nothing.
I'm trying to debug app locks :- )
TIA!
-
wrote on 2 Jan 2020, 11:33 last edited by
So if its already locked, then it waits? Will it try again locking or its just in waiting mode?
-
So if its already locked, then it waits? Will it try again locking or its just in waiting mode?
-
@Dariusz said in QMutexLocker - locking question:
So if its already locked, then it waits?
This is exactly what a mutex is build for...
5/5