QWaylandWindow: fix data race on mWaitingForUpdate
Caught by TSAN when running examples/quick/particles/system/. deliverUpdateRequest() is called from the main thread (and doesn't lock) and handleUpdate() is called from the render thread (and locks mFrameSyncMutex). I made the bool atomic (like others in this file), rather than locking mFrameSyncMutex. Pick-to: 6.9 6.8 Change-Id: Ic2f2eafc2d91cc9676dee5a7cd1872f91dff09e2 Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
7d77e1d9f8
commit
4472d1cd10
@ -312,7 +312,7 @@ protected:
|
||||
QWaitCondition mFrameSyncWait;
|
||||
|
||||
// True when we have called deliverRequestUpdate, but the client has not yet attached a new buffer
|
||||
bool mWaitingForUpdate = false;
|
||||
std::atomic_bool mWaitingForUpdate = false;
|
||||
bool mExposed = false;
|
||||
|
||||
// written from the main thread, read by the render thread
|
||||
|
Loading…
x
Reference in New Issue
Block a user