Bladeren bron

LibCore: Always wait_for_events() when pumping the event loop

This fixes an issue where continuously posting new events to the queue
would keep the event loop saturated, causing it to ignore notifiers.

Since notifiers are part of the big select(), we always have to call
wait_for_events() even if there are pending events. We're already smart
enough to select() without a timeout if we already have pending events.
Andreas Kling 5 jaren geleden
bovenliggende
commit
c3379e3734
1 gewijzigde bestanden met toevoegingen van 1 en 2 verwijderingen
  1. 1 2
      Libraries/LibCore/EventLoop.cpp

+ 1 - 2
Libraries/LibCore/EventLoop.cpp

@@ -320,8 +320,7 @@ int EventLoop::exec()
 
 void EventLoop::pump(WaitMode mode)
 {
-    if (m_queued_events.is_empty())
-        wait_for_event(mode);
+    wait_for_event(mode);
 
     decltype(m_queued_events) events;
     {