forked from debauchee/barrier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows 8+: make waiting for messages correspond to emptiness check
Fixes high cpu usage spikes on win10. When queue was containing messages of only non-QS_POSTMESSAGE type the "while (m_buffer->isEmpty())" busy-looped in EventQueue::getEvent since isEmpty was true (checked only QS_POSTMESSAGE message type), but waitForEvent returned immediately (checked more message types). Investigation shows that the difference was introduced in debauchee@dbfb04a6e to fix a problem with bad behaviour of GetQueueStatus Researching showed that a similar problem was fixed in Qt, and the solution was "pass different flags to GetQueueStatus depending on version of windows" https://bugreports.qt.io/browse/QTBUG-29097 So this patch makes changes to a barrier non-GUI core similar to Qt fix.
- Loading branch information
Vasily Galkin
committed
May 29, 2020
1 parent
8ab6ad6
commit 95f2a84
Showing
2 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters