Antoine Pitrou <pit...@free.fr> added the comment:

Some comments:

- why do you say Thread.join() uses a busy loop? is it because it uses 
Condition.wait()? If so, this will be solved in py3k by issue7316 (which you 
are welcome to review). Otherwise, I think there should be an upper bound on 
the sleeping granularity (say 2 seconds).

- the "if 'timeout' in kwargs" dance is a bit complicated. Why not simply 
"kwargs.pop('timeout', None)"?

- if it times out, communicate() should raise a specific exception. Bonus 
points if the exception holds the partial output as attributes (that's what we 
do for non-blocking IO in py3k), but if it's too difficult we can leave that 
out. I don't think returning None would be very good.

- for consistency, other methods should probably raise the same exception. I 
think we can leave out the more complex scenarios such as "timing out but still 
processing the beginning of the output".

- I agree that further input from python-dev or python-ideas would be nice

----------
nosy: +pitrou

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

Reply via email to