diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-04 15:35:16 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-17 12:02:56 +0200 |
commit | d4b206b246caf9b49110526585693ab629609d99 (patch) | |
tree | 1149ccd1e50f2e5cda8dcfba09c3e3bdcfb2a2a3 /src/corelib/thread/qmutex_win.cpp | |
parent | 77d812683f0ad595606f9833613dd49bb2fda26d (diff) |
Split QMutex and QRecursiveMutex
These classes should not inherit from each other
anymore in Qt 6. The reason is that this makes
the 95% case of using a non-recursive mutex
much slower than it has to be.
This way, QMutex can now inline the fast path
and be pretty much as fast as QBasicMutex is
in Qt 5. They actually use the same code paths
now. The main difference is that QMutex allows
calling tryLock() with a timeout, which that
is not allowed for QBasicMutex.
[ChangeLog][QtCore][QMutex] QMutex does not support
recursive locking anymore. Use QRecursiveMutex for that
purpose. QRecursiveMutex does not inherit QMutex anymore
in Qt 6.
Change-Id: I10f9bab6269a9181a2e9f534fb72ce65bc76d989
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qmutex_win.cpp')
-rw-r--r-- | src/corelib/thread/qmutex_win.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qmutex_win.cpp b/src/corelib/thread/qmutex_win.cpp index 73673cd5fb..cf863aeebc 100644 --- a/src/corelib/thread/qmutex_win.cpp +++ b/src/corelib/thread/qmutex_win.cpp @@ -49,7 +49,7 @@ QMutexPrivate::QMutexPrivate() event = CreateEvent(0, FALSE, FALSE, 0); if (!event) - qWarning("QMutexData::QMutexData: Cannot create event"); + qWarning("QMutexPrivate::QMutexPrivate: Cannot create event"); } QMutexPrivate::~QMutexPrivate() |