STINNER Victor added the comment:

> It still seems to me that this is pretty atypical use of selectors

I already implemented something similar to subprocess.Popen.communicate() when 
I was working on old Python versions without the timeout parameter of 
communicate().
http://ufwi.org/projects/edw-svn/repository/revisions/master/entry/trunk/src/nucentral/nucentral/common/process.py#L222

IMO calling select with a few file descriptors (between 1 and 3) and destroying 
quickly the "selector" is no a rare use case.

If I would port my code to selectors, I don't want to rewrite it to keep the 
selector alive longer, just because selectors force me to use the 
super-powerful fast epoll/kqueue selector.

(To be honest, I will probably not notice any performance impact. But I like 
reducing the number of syscalls, not the opposite :-))

----------

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

Reply via email to