Skip to content

Commit

Permalink
Merge pull request #26 from minrk/poll-timeout
Browse files Browse the repository at this point in the history
select.poll timeout is in milliseconds
  • Loading branch information
minrk authored Dec 12, 2018
2 parents cef60f7 + 92b374b commit 75ee16a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def test_pipes_stderr():
with pipes(stdout=stdout, stderr=STDOUT) as (_stdout, _stderr):
printf(u"Hellø")
libc.fflush(c_stdout_p)
time.sleep(0.1)
printf_err(u"Hi, stdérr")
assert _stdout is stdout
assert _stderr is None
Expand Down
2 changes: 1 addition & 1 deletion wurlitzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def forwarder():
poller.register(pipe_, select.POLLIN | select.POLLPRI)

while pipes:
events = poller.poll(flush_interval)
events = poller.poll(int(flush_interval * 1000))
#r = all([(r_[1] == (select.POLLIN | select.POLLPRI)) for r_ in events])
if events:
# found something to read, don't block select until
Expand Down

0 comments on commit 75ee16a

Please sign in to comment.