[docs] [issue14502] Document better what happens on releasing an unacquired lock
report at bugs.python.org
Fri Apr 6 21:37:14 CEST 2012
Jim Jewett <jimjjewett at gmail.com> added the comment:
On Fri, Apr 6, 2012 at 5:57 AM, Antoine Pitrou <report at bugs.python.org> wrote:
> Antoine Pitrou <pitrou at free.fr> added the comment:
>> > Not sure what you're talking about. The doc patch is about unacquired
>> > locks, not locks that someone else (another thread) holds.
>> Isn't one common reason for not being able to acquire a lock that
>> someone else was already holding it?
> We're talking about *releasing* an (un)acquired lock, not acquiring it
Right, but I thought the original motivation was concern over a race
condition in the lock acquisition.
try: # What if something happens here, during
try setup? Leak?
lock.release() # But what if the acquire failed?
Python tracker <report at bugs.python.org>
More information about the docs