mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
poll() takes times in ms not seconds
This commit is contained in:
@@ -164,7 +164,7 @@ class PrewarmProcess:
|
|||||||
input_buf = b''
|
input_buf = b''
|
||||||
st = time.monotonic()
|
st = time.monotonic()
|
||||||
while time.monotonic() - st < timeout:
|
while time.monotonic() - st < timeout:
|
||||||
for (fd, event) in self.poll.poll(0.2):
|
for (fd, event) in self.poll.poll(200):
|
||||||
if event & error_events:
|
if event & error_events:
|
||||||
raise PrewarmProcessFailed('Failed doing I/O with prewarm process')
|
raise PrewarmProcessFailed('Failed doing I/O with prewarm process')
|
||||||
if fd == self.read_from_process_fd and event & select.POLLIN:
|
if fd == self.read_from_process_fd and event & select.POLLIN:
|
||||||
@@ -192,7 +192,7 @@ class PrewarmProcess:
|
|||||||
st = time.monotonic()
|
st = time.monotonic()
|
||||||
while time.monotonic() - st < timeout and output_buf:
|
while time.monotonic() - st < timeout and output_buf:
|
||||||
self.poll_to_send(bool(output_buf))
|
self.poll_to_send(bool(output_buf))
|
||||||
for (fd, event) in self.poll.poll(0.2):
|
for (fd, event) in self.poll.poll(200):
|
||||||
if event & error_events:
|
if event & error_events:
|
||||||
raise PrewarmProcessFailed('Failed doing I/O with prewarm process: {event}')
|
raise PrewarmProcessFailed('Failed doing I/O with prewarm process: {event}')
|
||||||
if fd == self.write_to_process_fd and event & select.POLLOUT:
|
if fd == self.write_to_process_fd and event & select.POLLOUT:
|
||||||
|
|||||||
Reference in New Issue
Block a user