[issue17374] Remove restriction against Semaphore having a negative value
Amaury Forgeot d'Arc
report at bugs.python.org
Thu Mar 7 10:38:31 CET 2013
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 <report at bugs.python.org>
<http://bugs.python.org/issue17374>
_______________________________________
More information about the Python-bugs-list
mailing list