Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73928

Re: threading.Condition.wait() is not catching SIGTERM

Date 2014-07-04 09:28 +1000
From Cameron Simpson <cs@zip.com.au>
Subject Re: threading.Condition.wait() is not catching SIGTERM
References <roy-F18CDB.16431303072014@news.panix.com>
Newsgroups comp.lang.python
Message-ID <mailman.11475.1404431213.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 03Jul2014 16:43, Roy Smith <roy@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@zip.com.au>

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: threading.Condition.wait() is not catching SIGTERM Ned Deily <nad@acm.org> - 2014-07-03 13:13 -0700
  Re: threading.Condition.wait() is not catching SIGTERM Roy Smith <roy@panix.com> - 2014-07-03 16:43 -0400
    Re: threading.Condition.wait() is not catching SIGTERM Cameron Simpson <cs@zip.com.au> - 2014-07-04 09:28 +1000

csiph-web