Message154093
| Author |
neologix |
| Recipients |
neologix, sbt |
| Date |
2012年02月23日.22:06:20 |
| SpamBayes Score |
3.7669815e-06 |
| Marked as misclassified |
No |
| Message-id |
<1330034780.92.0.509259920259.issue14087@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
In test/test_multiprocessing.py:
"""
def test_waitfor(self):
[...]
with cond:
result = cond.wait_for(lambda : state.value==0)
self.assertTrue(result)
self.assertEqual(state.value, 0)
for i in range(4):
time.sleep(0.01)
with cond:
state.value += 1
cond.notify()
"""
Shouldn't the `for` loop be outside the outer `with` block?
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).
Finally, the documentation should be updated (Doc/library/multiprocessing.rst).
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? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年02月23日 22:06:21 | neologix | set | recipients:
+ neologix, sbt |
| 2012年02月23日 22:06:20 | neologix | set | messageid: <1330034780.92.0.509259920259.issue14087@psf.upfronthosting.co.za> |
| 2012年02月23日 22:06:20 | neologix | link | issue14087 messages |
| 2012年02月23日 22:06:20 | neologix | create |
|