Document performance of QMutex
Change-Id: I4de2fd5ba717975b5de98ffe7ca6348afbed1b2f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
1de3fe0f9b
commit
45be405408
@ -139,6 +139,11 @@ public:
|
|||||||
lock calls unlock(). A non-blocking alternative to lock() is
|
lock calls unlock(). A non-blocking alternative to lock() is
|
||||||
tryLock().
|
tryLock().
|
||||||
|
|
||||||
|
QMutex is optimized to be fast in the non-contended case. A non-recursive
|
||||||
|
QMutex will not allocate memory if there is no contention on that mutex.
|
||||||
|
It is constructed and destroyed with almost no overhead,
|
||||||
|
which means it is fine to have many mutexes as part of other classes.
|
||||||
|
|
||||||
\sa QMutexLocker, QReadWriteLock, QSemaphore, QWaitCondition
|
\sa QMutexLocker, QReadWriteLock, QSemaphore, QWaitCondition
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -165,6 +170,8 @@ public:
|
|||||||
a thread may only lock a mutex once. The default is
|
a thread may only lock a mutex once. The default is
|
||||||
QMutex::NonRecursive.
|
QMutex::NonRecursive.
|
||||||
|
|
||||||
|
Recursive mutexes are slower and take more memory than non-recursive ones.
|
||||||
|
|
||||||
\sa lock(), unlock()
|
\sa lock(), unlock()
|
||||||
*/
|
*/
|
||||||
QMutex::QMutex(RecursionMode mode)
|
QMutex::QMutex(RecursionMode mode)
|
||||||
|
Loading…
Reference in New Issue
Block a user