3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-07 06:44:06 +00:00

jobserver: Only poll non-helper-process jobserver fd when ready to read

This avoids SBY going into a busy wait loop in that case.
This commit is contained in:
Jannis Harder 2022-12-09 16:24:22 +01:00
parent 9c75e49418
commit 19109fd9f2

View file

@ -287,7 +287,7 @@ class SbyJobClient:
def poll_fds(self):
if self.helper_process:
return [self.response_read_fd]
elif self.read_fd is not None:
elif self.read_fd is not None and self.has_pending_leases():
return [self.read_fd]
else:
return []