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 returns a unique index in range(N). - I added an "action_args" parameter to the constructor. This is a tuple which provides argument to the "action" callback. (This is because closures are not picklable, making no-argument callbacks rather limiting for multiprocessing.) ---------- nosy: +sbt Added file: http://bugs.python.org/file24579/barrier.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14059> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com