[issue14087] multiprocessing.Condition.wait_for missing

sbt report at bugs.python.org
Fri Feb 24 14:26:56 CET 2012


sbt <shibturn at gmail.com> added the comment:

> Shouldn't the `for` loop be outside the outer `with` block?

Yes.

> In Lib/multiprocessing/managers.py:
> Is there a good reason why the wait_for() proxy method can't simply be
> implemented as:
> return self._callmethod('wait_for', (predicate, timeout))?
> 
> (There may be, I just didn't check).

That would only work if predicate is picklable, which is unlikely to be the case.  (The lambda functions used in the unit tests are not picklable.)

> Finally, the documentation should be updated 
> (Doc/library/multiprocessing.rst).

Fixed in new patch.

> Otherwise, it would probably be better if you could submit a contributor 
> agreement (and also maybe update your name on the tracker), unless that's
> a problem for you?

I will try to submit it over the weekend.

----------
Added file: http://bugs.python.org/file24626/cond_wait_for.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14087>
_______________________________________


More information about the Python-bugs-list mailing list