Message285353
If SelectSelector.select() is called when there are no fds registered, then it ends up calling select.select([], [], [], timeout).
On sensible operating systems, this is equivalent to time.sleep(timeout). On Windows, it raises an error. Asyncio manages to avoid hitting this due to the fact that it always has at least one fd registered, but it causes problems for other users of the selectors module, e.g.:
https://github.com/dabeaz/curio/issues/75
I see two possible approaches to fixing this:
1) Modify SelectSelector to check for this case and call time.sleep() instead of select.select() when encountered.
2) Modify the select.select() wrapper so that it behaves consistently on all operating systems, by special-casing this situation on Windows.
Option (2) seems nicer to me. |
|
Date |
User |
Action |
Args |
2017-01-12 23:42:18 | njs | set | recipients:
+ njs |
2017-01-12 23:42:18 | njs | set | messageid: <1484264538.85.0.902649207203.issue29256@psf.upfronthosting.co.za> |
2017-01-12 23:42:18 | njs | link | issue29256 messages |
2017-01-12 23:42:18 | njs | create | |
|