[issue17374] Remove restriction against Semaphore having a negative value

Raymond Hettinger report at bugs.python.org
Sun Mar 10 23:11:51 CET 2013


Raymond Hettinger added the comment:

[Antoine]
> multiprocessing.Semaphore should be kept compatible 
> with threading.Semaphore.

I just looked at the C code implementing multiprocessing Semaphore.  Removing the negative count restriction there looks straight-forward.  I'll include it in the patch or will open a separate tracker item for it.

[Charles-François]
> POSIX semaphore don't support negative initial value.

It was an early design decision to go with the Java threading model rather than the POSIX model.  The Java API supports negative initial values -- the same Dijkstra's original P() and V().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17374>
_______________________________________


More information about the Python-bugs-list mailing list