[issue9863] threading, signals, atexit: different execution with different versions

2010-09-15 Thread R. David Murray
R. David Murray added the comment: I'm closing this as invalid, but I note that this kind of behavior change is not something we would normally have done in a point release if we had realized the consequences. -- resolution: -> invalid stage: -> committed/rejected status: open -> cl

[issue9863] threading, signals, atexit: different execution with different versions

2010-09-15 Thread Corey Bertram
Corey Bertram added the comment: On second thought, i'll just move forward with this new expected behavior. I understand the design decision and why it was made here in regards to waiting for threads to shutdown before atexit kicks in. My intended use for atexit just no longer works in this p

[issue9863] threading, signals, atexit: different execution with different versions

2010-09-15 Thread Corey Bertram
Corey Bertram added the comment: let me preface this: I'm no expert on how this should be done ect... The goal here was to specifically not set daemon on the test_loop thread. In an actual app test_loop would perhaps need to shutdown cleanly (save state or what have you). That said, your prev

[issue9863] threading, signals, atexit: different execution with different versions

2010-09-15 Thread Ned Deily
Ned Deily added the comment: A better fix for the program is to mark the test_loop thread as a daemon thread. As the threading module documentation says, by default threads started from the main thread are non-daemon threads and the "entire Python program exits when no alive non-daemon threa

[issue9863] threading, signals, atexit: different execution with different versions

2010-09-15 Thread Ned Deily
Ned Deily added the comment: I can verify that the test case terminates with 2.6.2 and 2.5.1 but does not for 2.6.6, 2.7, and 3.2. This is indeed almost certainly due to Issue1722344. r75749 moved wait_for_thread_shutdown into Py_Finalize just before the atexit functions are called. The pre

[issue9863] threading, signals, atexit: different execution with different versions

2010-09-15 Thread R. David Murray
R. David Murray added the comment: I can confirm this, and that it works on python2.5 (I don't have a 2.6.2 around to test). It also has the looping behavior on 2.7 and 3.2. Given the timing, I wonder if this is the result of the fix to issue 1722344. (Note, I removed 2.6 because it doesn't

[issue9863] threading, signals, atexit: different execution with different versions

2010-09-15 Thread Corey Bertram
New submission from Corey Bertram : my code works on python 2.6.2 and fails to work on python 2.6.5. What's going on here? import atexit, sys, signal, time, threading terminate = False threads = [] def test_loop(): while True: if terminate: print('stopping thread')

[issue9863] threading, signals, atexit: different execution with different versions

2010-09-15 Thread Corey Bertram
Changes by Corey Bertram : -- nosy: cbertram priority: normal severity: normal status: open title: threading, signals, atexit: different execution with different versions type: behavior versions: Python 2.6 ___ Python tracker