[issue19158] BoundedSemaphore.release() subject to races

Antoine Pitrou report at bugs.python.org
Tue Oct 8 10:50:44 CEST 2013


Antoine Pitrou added the comment:

The implementation is a bit weird. Why take the lock a second time instead of simply reimplementing the release() method?
(it's a 5-liner)

By the way, Semaphore.acquire could probably use Condition.wait_for.

----------
nosy: +pitrou

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


More information about the Python-bugs-list mailing list