encoder.py: Further simplify.

main
Peter Hinch 2023-11-11 16:49:59 +00:00
rodzic 95a8d3abcb
commit 17c83a9147
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -17,10 +17,11 @@ from select import poll, POLLIN
def ready(tsf, poller):
poller.register(tsf, POLLIN)
r = (tsf, POLLIN)
poller.register(*r)
def is_rdy():
return len([t for t in poller.ipoll(0) if t[0] is tsf]) > 0
return r in poller.ipoll(0)
return is_rdy