diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2019-07-07 13:44:26 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2019-07-08 13:23:39 +0200 |
commit | a41701904e880f58e19b352ade1931d6cd1a7112 (patch) | |
tree | cd4f92b54bd9c2daafe6042b2648de462d5fdf55 /sync.profile | |
parent | 1e9355fdf2c03e119c7e546c8bac3947d6c6b0b8 (diff) |
xcb: fix thread synchronization issue in QXcbEventQueue::waitForNewEvents()
This patch amends 730cbad8824bcfcb7ab60371a6563cfb6dd5658d
The issue was that the event reader thread (QXcbEventQueue::run()) can enqueue
events sometime between GUI thread has last time peeked at the queue and before
it has called waitForNewEvents() and hence started waiting for more events (via
QWaitCondition). This scenario is even mentioned in the QWaitCondition documentation:
"[..] if some of the threads are still in do_something() when the key is pressed,
they won't be woken up (since they're not waiting on the condition variable) and
so the task will not be performed for that key press. [..]"
And if there are no more events on the X11 connection, the waitForNewEvents()
in QXcbClipboard::waitForClipboardEvent() would timeout.
Fixes: QTBUG-75319
Change-Id: I8990a2a0c00571dfc334fb57d616dee999042885
Reviewed-by: Igor Kushnir <igorkuo@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'sync.profile')
0 files changed, 0 insertions, 0 deletions