[issue14059] Implement multiprocessing.Barrier

2012-06-15 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2d2f206d040e by Richard Oudkerk in branch 'default': Issue #14059: Implement multiprocessing.Barrier http://hg.python.org/cpython/rev/2d2f206d040e -- nosy: +python-dev

[issue14059] Implement multiprocessing.Barrier

2012-06-15 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14059 ___

[issue14059] Implement multiprocessing.Barrier

2012-06-05 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: The attached patch uses memoryview instead of ctypes. If the patch for Issue #14953 (reimplementing RawArray/RawValue in terms of memoryview) is applied, then it could be simplified a bit. -- Added file:

[issue14059] Implement multiprocessing.Barrier

2012-05-26 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: RawValue uses ctypes, right? That's problematic for platforms which don't support ctypes. Are there many posix systems (we care about) where ctypes doesn't work? It would be fairly easy to use memoryview instead of ctypes. (In fact

[issue14059] Implement multiprocessing.Barrier

2012-05-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: RawValue uses ctypes, right? That's problematic for platforms which don't support ctypes. Are there many posix systems (we care about) where ctypes doesn't work? It depends what you call caring about :-) But proprietary Unix C compilers

[issue14059] Implement multiprocessing.Barrier

2012-04-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: RawValue uses ctypes, right? That's problematic for platforms which don't support ctypes. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14059

[issue14059] Implement multiprocessing.Barrier

2012-04-25 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: The patch looks good. However, I've had two failures while testing it: - a BrokenBarrierError on test_default_timeout: I see you've already increased the timeout from the original threading code, but you can probably double it (we

[issue14059] Implement multiprocessing.Barrier

2012-03-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- dependencies: +multiprocessing.Condition.wait_for missing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14059 ___

[issue14059] Implement multiprocessing.Barrier

2012-02-23 Thread sbt
sbt shibt...@gmail.com added the comment: Patch which subclasses threading.Barrier. -- keywords: +patch Added file: http://bugs.python.org/file24614/mp_barrier.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14059

[issue14059] Implement multiprocessing.Barrier

2012-02-23 Thread sbt
sbt shibt...@gmail.com added the comment: Forgot to mention, mp_barrier.patch needs to be applied on top of cond_wait_for.patch for Issue14087. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14059

[issue14059] Implement multiprocessing.Barrier

2012-02-22 Thread sbt
sbt shibt...@gmail.com added the comment: Wouldn't it be simpler with a mp.Condition? Well, it is a fair bit shorter than the implementation in threading.py. But that is not a fair comparison because it does implement reset(). I was trying to avoid using shared memory/ctypes since

[issue14059] Implement multiprocessing.Barrier

2012-02-20 Thread sbt
sbt shibt...@gmail.com added the comment: Here is an initial implementation. Differences from threading.Barrier: - I have not implemented reset(). - wait() returns 0 or -1. One thread returns 0, the remainder return -1. This is different to threading.Barrier where each of the N threads

[issue14059] Implement multiprocessing.Barrier

2012-02-20 Thread sbt
sbt shibt...@gmail.com added the comment: barrier_tests.py contains minor modifications of the unit tests for threading.Barrier. (The two tests using reset() are commented out.) The implementation passes for me on Linux and Windows. -- Added file:

[issue14059] Implement multiprocessing.Barrier

2012-02-20 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Here is an initial implementation. Wouldn't it be simpler with a mp.Condition? Otherwise, this should be added to Lib/multiprocesing.synchronize.py, and the tests to test_multiprocessing. -- nosy: +neologix

[issue14059] Implement multiprocessing.Barrier

2012-02-19 Thread Matt Joiner
New submission from Matt Joiner anacro...@gmail.com: There is no Barrier in multiprocessing corresponding to threading.Barrier. -- components: Library (Lib) messages: 153744 nosy: anacrolix priority: normal severity: normal status: open title: Implement multiprocessing.Barrier type: