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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:not': 0.03; 'argument': 0.05; '"if': 0.09; 'clause': 0.09; 'false,': 0.09; 'received:localdomain': 0.11; 'bug': 0.12; '>that': 0.16; 'block.': 0.16; 'blocking': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'roy': 0.16; 'simpson': 0.16; 'url:html)': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'otherwise,': 0.22; 'header:User-Agent:1': 0.23; 'cheers,': 0.24; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'block,': 0.31; 'text': 0.33; 'url:python': 0.33; 'noticed': 0.34; '"the': 0.34; 'false': 0.36; 'received:com.au': 0.36; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'received:211': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'obtain': 0.39; 'to:addr:python.org': 0.39; 'content-disposition:inline': 0.62; 'smith': 0.68; 'describes': 0.84; 'locked': 0.84
Date Fri, 4 Jul 2014 09:28:26 +1000
From Cameron Simpson <cs@zip.com.au>
To python-list@python.org
Subject Re: threading.Condition.wait() is not catching SIGTERM
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Disposition inline
In-Reply-To <roy-F18CDB.16431303072014@news.panix.com>
User-Agent Mutt/1.5.21 (2010-09-15)
References <roy-F18CDB.16431303072014@news.panix.com>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=QIpRGG7L c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=LcaDllckn3IA:10 a=V4vEGRATZAEA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=VUfPOBp7AAAA:8 a=8AHkEIZyAAAA:8 a=i-bEB9zhwhnWBinGNs8A:9 a=CjuIK1q_8ugA:10 a=ULjp6RfcKGoA:10 a=5hK03km2n30A:10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11475.1404431213.18130.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404431213 news.xs4all.nl 2907 [2001:888:2000:d::a6]:39158
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73928

Show key headers only | 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