Amaury Forgeot d'Arc added the comment: > 3. When a thread increments the semaphore, if there are other > threads waiting, one of the waiting threads gets unblocked. Is a condition missing here? "if the resulting count is positive"
Since the use case is different from a regular Semaphore, I think it make sense to have a new Barrier class. It's not obvious for me why I need (1-n) to wait for n completed tasks. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17374> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com