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


Groups > comp.lang.python > #29009

Re: Some questions about atexit

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'say,': 0.05; 'correct.': 0.07; 'closed.': 0.09; 'handlers': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'thread': 0.11; 'atexit': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'roy': 0.16; 'subject:questions': 0.16; 'thread?': 0.16; 'url:html)': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'tracker': 0.20; 'doc': 0.22; 'statement': 0.23; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'newer': 0.27; 'header:X -Complaints-To:1': 0.28; 'case,': 0.29; '"the': 0.29; 'probably': 0.29; 'this.': 0.29; 'url:python': 0.32; 'docs': 0.33; 'to:addr :python-list': 0.33; 'another': 0.33; 'changed': 0.34; 'wrong': 0.34; 'clear': 0.35; 'open': 0.35; 'pm,': 0.35; 'there': 0.35; 'received:org': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'should': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'registered': 0.38; 'some': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'called': 0.39; 'header:Received:5': 0.40; 'first': 0.61; 'believe': 0.69; 'smith': 0.71; 'received:fios.verizon.net': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Some questions about atexit
Date Wed, 12 Sep 2012 22:29:00 -0400
References <roy-68612B.20582312092012@news.panix.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-251-66.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0
In-Reply-To <roy-68612B.20582312092012@news.panix.com>
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.587.1347503376.27098.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1347503376 news.xs4all.nl 6876 [2001:888:2000:d::a6]:50152
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29009

Show key headers only | View raw


On 9/12/2012 8:58 PM, Roy Smith wrote:
> The atexit docs (http://docs.python.org/library/atexit.html) are very
> confusing.  In one place they say, "The order in which the functions are
> called is not defined".  In another place, "all functions registered are
> called in last in, first out order".  Which is correct?

Check the tracker (bugs.python.org) for atexit issues, open and closed. 
I believe there was one about order and whether to make a guarantee. The 
doc might have been changed one place and not another. The newer 
statement is probably correct. In any case, the wrong place should be 
corrected.

> Also, it's not clear how atexit handlers interact with threading.  Do
> all handlers get called in the main thread?  What if some other thread
> registers a handler?  Does it get called in that thread?

Don't know about this.

-- 
Terry Jan Reedy

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


Thread

Some questions about atexit Roy Smith <roy@panix.com> - 2012-09-12 20:58 -0400
  Re: Some questions about atexit Terry Reedy <tjreedy@udel.edu> - 2012-09-12 22:29 -0400
    Re: Some questions about atexit Roy Smith <roy@panix.com> - 2012-09-13 09:03 -0400

csiph-web