Message196996
On 05/09/2013 9:28am, Charles-François Natali wrote:
> As a side note, in the general case, there's more than a performance
> optimization: the problem with unregister() + register() vs a real
> modify (e.g. EPOLL_CTL_MOD) is that it's subject to a race condition,
> if an event fires during the short window where the FD isn't
> registered anymore.
Even with edge-triggered notification, doesn't registering an fd check
the current readiness:
>>> import os, select
>>> r, w = os.pipe()
>>> p = select.epoll()
>>> os.write(w, b"h")
>>> p.register(r, select.EPOLLIN | select.EPOLLET)
>>> p.poll(0)
[(3, 1)]
>>> p.poll(0)
[]
Otherwise it would be very difficult to edge-triggered notification. |
|
Date |
User |
Action |
Args |
2013-09-05 13:09:02 | sbt | set | recipients:
+ sbt, gvanrossum, pitrou, vstinner, giampaolo.rodola, christian.heimes, meador.inge, neologix, rosslagerwall, python-dev, felipecruz |
2013-09-05 13:09:02 | sbt | link | issue16853 messages |
2013-09-05 13:09:02 | sbt | create | |
|