[issue10978] Add optional argument to Semaphore.release for releasing multiple threads

Josh Rosenberg report at bugs.python.org
Thu Jun 26 01:55:38 CEST 2014


Josh Rosenberg added the comment:

Never know whether to comment on issue itself, but just in case:

There are issues with the patch when n < 0 is passed, as n is not sanity checked, which would break the Semaphore invariant (value must be >= 0). n == 0 is also a weird value, but harmless if passed; release(0) would acquire and release the lock but otherwise act as a noop.

----------

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


More information about the Python-bugs-list mailing list