The epoll change in
https://code.google.com/p/tulip/source/detail?r=5b7e17a75ba4b9bdaab5969a787e904137a53aeedoesn't
work.  An integer number of milliseconds cannot be represented
exactly as a floating-point number of seconds, so you lose precision when
passing the adjusted timeout into epoll_wait and it rounds down to zero
again:

>>> int(math.ceil(0.0005 * 1e3) / 1e3)
0

This needs to be fixed at the level of the select module.

-Ben


On Mon, Jan 20, 2014 at 11:58 AM, Victor Stinner
<[email protected]>wrote:

> 2014/1/20 Guido van Rossum <[email protected]>:
> > If you fix this in selectors.py (as opposed to the C extensions) the
> > fix is (nearly) automatically incorporated in Tulip for Python 3.3.
>
> In fact, there are two bugs:
> - select.epoll.poll(): in C mode
> - selectors.PollSelector.select(): in selectors.py
>
> The epoll bug can be worked around in the copy of selectors.py in
> Tulip. By the way, Tulip uses its own copy of selectors.py (by
> default, with a "except ImportError", I don't understand the except, I
> proposed to remove it in my patch).
>
> Victor
>

Reply via email to