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 neologix
Recipients neologix, pitrou, sbt
Date 2013-01-06.19:42:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM0AmJ+19wsJNcHwHQ=wx4EfqWSXVQt_M1OWbHn9THdP9A@mail.gmail.com>
In-reply-to <1357500015.18.0.808528305373.issue16873@psf.upfronthosting.co.za>
Content
> That assumes that epoll_wait() is supposed to return *all* ready fds.  But that is not possible because maxevents is finite.  If you want all events then obviously you may need to call epoll_wait() multiple times.

Yes, but the problem is that between two epoll_wait() calls, the
readiness of the FDs can have changed: and if that happens, you'll get
the same list over and over.

> The program can only terminate when the outer
>
>     while all_writers - seen_writers:
>         ...
>
> loop terminates.  So seen_writers == all_writers, and every fd has been reported.

Yes, but there are no event generated between calls to epoll_wait() in
your inner loop.
In a typical usage of select()/poll() epoll() will look like:

while True:
    evts = poll()
    for evt in evts:
        do_something(fd)

and between two calls to poll(), you can get new events (new
connections, space in the socket buffer, etc). The pipe
filling/draining is used to generate new events. Your modification
doesn't take that into account.

> This is the part I disagree with -- I think it makes all the difference.  Please try making such a modification.

Will do.
History
Date User Action Args
2013-01-06 19:42:05neologixsetrecipients: + neologix, pitrou, sbt
2013-01-06 19:42:05neologixlinkissue16873 messages
2013-01-06 19:42:05neologixcreate