Message98464
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 |
|
Date |
User |
Action |
Args |
2010-01-28 15:33:20 | pitrou | set | recipients:
+ pitrou, guettli, astrand, orsenthil, giampaolo.rodola, abbot, r.david.murray, rnk, srid |
2010-01-28 15:33:19 | pitrou | set | messageid: <1264692799.94.0.771039485543.issue5673@psf.upfronthosting.co.za> |
2010-01-28 15:33:18 | pitrou | link | issue5673 messages |
2010-01-28 15:33:17 | pitrou | create | |
|