[Development] Qt 5 types under consideration for deprecation / removal in Qt 6
marc at kdab.com
Fri Aug 23 10:31:20 CEST 2019
On 2019-05-29 12:53, Mutz, Marc via Development wrote:
> === QWaitCondition -> std::condition_variable(_any) ===
> Plumbing that std::condition_variable can do better.
So, I've looked at QWaitCondition because I had a need to call wait()
with a QBasicMutex instead of a QMutex, and that doesn't exist, yet. I
was surprised about what I saw, so I have to ask:
Do I understand it correctly that the implementation of QWaitCondition
has _another_ mutex inside?! So, two mutexes? The one users pass in and
then the one that QWaitCondition uses internally, because it's
pthread_cond and that needs pthread_mutex?
If that's the case, shouldn't we run, not walk, to replace our internal
uses with std::mutex + std::condition_variable to have only one mutex?
More information about the Development