threading.Condition.wait() is not catching SIGTERM

Cameron Simpson cs at zip.com.au
Fri Jul 4 01:28:26 CEST 2014


On 03Jul2014 16:43, Roy Smith <roy at panix.com> wrote:
[...]
>Hmmm, I just also noticed what I think is a bug in the docs
>(https://docs.python.org/2/library/threading.html).  It says, "If a call
>with blocking set to True would block, return False immediately".  Isn't
>that backwards?  Doesn't that describe the blocking=False behavior?

If you mean this text under Lock.acquire:

   When invoked with the blocking argument set to False, do not block. If a call 
   with blocking set to True would block, return False immediately; otherwise, 
   set the lock to locked and return True.

that pretty clearly (to me) describes blocking=False, by contrasting it with a 
behaviour that would obtain if blocking=True. It is in the clause describing 
"the blocking argument set to False", after all.

Cheers,
Cameron Simpson <cs at zip.com.au>



More information about the Python-list mailing list