This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients christian.heimes, felipecruz, giampaolo.rodola, gvanrossum, meador.inge, neologix, pitrou, python-dev, rosslagerwall, sbt, vstinner
Date 2013-09-05.13:09:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <52288264.3030702@gmail.com>
In-reply-to <CAH_1eM2Vz_M7mPCpt0X3MuSquUJKvjOcAFn3qufPf0cR41vV2A@mail.gmail.com>
Content
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.
History
Date User Action Args
2013-09-05 13:09:02sbtsetrecipients: + sbt, gvanrossum, pitrou, vstinner, giampaolo.rodola, christian.heimes, meador.inge, neologix, rosslagerwall, python-dev, felipecruz
2013-09-05 13:09:02sbtlinkissue16853 messages
2013-09-05 13:09:02sbtcreate