Richard Oudkerk added the comment:

> 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().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16873>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to