Obsolete Members for QMutex

The following members of class QMutex are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(obsolete) QMutex(QMutex::RecursionMode mode)

Member Function Documentation

QMutex::QMutex(QMutex::RecursionMode mode)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Constructs a new mutex. The mutex is created in an unlocked state. Use QRecursiveMutex to create a recursive mutex.

If mode is QMutex::Recursive, a thread can lock the same mutex multiple times and the mutex won't be unlocked until a corresponding number of unlock() calls have been made. Otherwise a thread may only lock a mutex once. The default is QMutex::NonRecursive.

Recursive mutexes are slower and take more memory than non-recursive ones.

See also lock() and unlock().