summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-10-28 08:04:43 -0700
committerKeith Packard <keithp@keithp.com>2016-10-28 09:00:46 -0700
commit9ed5b263542e5245317927828f0515db6c0a54c8 (patch)
tree7aaec09973b728b14e68c545c059f6d6dc4f22a6 /os
parent2c91f3235a4e1655e18cb014922529161051ffbb (diff)
os: Recompute whether any clients are ready after ProcessWorkQueue() (bug 98030)
If a work proc wakes up a sleeping client and it is ready to execute, we need to re-compute the local 'are_ready' value before deciding what timeout value to use in WaitForSomething. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98030 Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'os')
-rw-r--r--os/WaitFor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/WaitFor.c b/os/WaitFor.c
index 7d5aa32c8..ff1c85e3a 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -204,8 +204,10 @@ WaitForSomething(Bool are_ready)
crashed connections and the screen saver timeout */
while (1) {
/* deal with any blocked jobs */
- if (workQueue)
+ if (workQueue) {
ProcessWorkQueue();
+ are_ready = clients_are_ready();
+ }
if (are_ready)
timeout = 0;