[base] Experiment with only invoking ::PeekMessage when there are pending messages
::PeekMessage can process sent-messages and internal events. It seems the kernel also uses it as a heuristic to deschedule the main thread when it thinks it's out of messages. In MessagePumpForUI's design, it's possible to have application tasks without pending native tasks (kMsgHaveWork is dropped when running out of native tasks). This CL uses ::GetQueueStatus() to probe the presence of messages before invoking ::PeekMessage(). Bug: 1075960 Change-Id: I4a93b22adf225ae2d62aabeb1a7a734232cf7fb6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2258456 Auto-Submit: Gabriel Charette <gab@chromium.org> Reviewed-by:François Doray <fdoray@chromium.org> Commit-Queue: François Doray <fdoray@chromium.org> Commit-Queue: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#781498}
Showing
Please register or sign in to comment