STINNER Victor added the comment:
It looks like select() and poll() in Linux < 2.6.28 has a resolution of 1/HZ,
where HZ can be retrieved from os.sysconf('SC_CLK_TCK'). Since Linux 2.6.28,
hrtimers are now used for timeouts.
"High- (but not too high-) resolution timeouts"
http://lwn.net/Articles/296578/
"What's in hrtimer.git for 2.6.28"
https://lkml.org/lkml/2008/9/20/136
Attached patch improves the resolution field of selectors.BaseSelector.
By the way, resolution should be a method (selector.resolution()) rather than a
property, because we may query the kernel to compute the resolution, as shown
in the patch.
----------
Added file: http://bugs.python.org/file33825/selector_resolution.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20452>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com