Garrett Berg added the comment:
It may be desirable to change:
> Once awoken, decrement the counter by 1.
to
> Once awoke, decrement the counter (which is guaranteed to be positive) by 1.
Although this could be considered obvious since the counter can never go below
zero.
--
_
Garrett Berg added the comment:
Also, is "The order in which threads are awoken should not be relied on"
actually true? Would it not be up to the OS specific scheduler? For instance,
wouldn't the POSIX scheduler use a priority queue of some kind?
--
__
New submission from Garrett Berg :
The definition of threading.Semaphore is confusing (for all versions of python
docs)
https://docs.python.org/2/library/threading.html#semaphore-objects
acquire([blocking])
It currently states the following:
> When invoked without arguments: if the internal