Message179189
> I actually wrote a script to reproduce this issue:
The program does *not* demonstrate starvation because you are servicing the resource represented by the "starved" duplicate fds before calling poll() again.
You are creating thousands of duplicate handles for the same resource and then complaining that they do not behave independently!
I tried modifing your program by running poll() in a loop, exiting when no more unseen fds are reported as ready. This makes the program exit immediately.
So
ready_writers = set(fd for fd, evt in
ep.poll(-1, MAXEVENTS) if fd != r)
seen_writers |= ready_writers
becomes
while True:
ready_writers = set(fd for fd, evt in
ep.poll(-1, MAXEVENTS) if fd != r)
if ready_writers.issubset(seen_writers):
break
seen_writers |= ready_writers
I still cannot see a problem with epoll(). |
|
Date |
User |
Action |
Args |
2013-01-06 15:45:36 | sbt | set | recipients:
+ sbt, pitrou, neologix |
2013-01-06 15:45:36 | sbt | set | messageid: <1357487136.23.0.795047316444.issue16873@psf.upfronthosting.co.za> |
2013-01-06 15:45:36 | sbt | link | issue16873 messages |
2013-01-06 15:45:36 | sbt | create | |
|