Charles-François Natali added the comment: >> 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().
Hum, yes, but my point was that multiprocessing semaphores are implemented atop POSIX semaphores, which don't support negative initial values. Also, since the API doesn't allow negative values, it's possible that an implementation uses the native POSIX semaphores, and this change would break such implementations. > 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. I'm not so sure about this, how would you do it? ---------- _______________________________________ 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