Is there anyway to check the number of I/O registered in poll?
crow
wentlv at gmail.com
Wed Mar 30 02:54:45 EDT 2011
I'm using select.poll to do I/O polling. polling is placed in a
independent thread
from select import poll
_poller = poll()
def poll(timeout):
l = _poller.poll(timeout)
return l
In my code, in some context, the timeout value will be high ( like 1
hour ), but there is no I/O in _poller, then this poll action will be
blocked till timeout.
Is there anyway to find how many I/O in _poller? Thus I can avoid
polling.
Thanks in advance.
More information about the Python-list
mailing list