Message179210
> 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. |
|
Date |
User |
Action |
Args |
2013-01-06 19:42:05 | neologix | set | recipients:
+ neologix, pitrou, sbt |
2013-01-06 19:42:05 | neologix | link | issue16873 messages |
2013-01-06 19:42:05 | neologix | create | |
|