Message53436
Logged In: YES
user_id=31435
Martin, change your program to do sys.exit(1) inside func()
on the first iteration (or raise SystemExit similarly), and
whether you're on Windows or Linux you should find that
while the func() thread goes away, the main program keeps
on running. If you do os._exit(1) instead, on Windows the
main program does go away, but Guido said it doesn't on
Linux (which didn't surprise me, given Linux's conflation
of threads with processes). See also the "Killing Threads"
thread in Python-Dev from late May of 2001, which said all
the same things.
The only thing I may <wink> have learned since then is that
supposedly the *C* exit() function terminates all threads
on Linux, via an atexit handler installed by libc, and so
_exit() on Linux doesn't terminate all threads because _exit
() doesn't call atexit functions. |
|
Date |
User |
Action |
Args |
2007-08-23 16:01:58 | admin | link | issue502236 messages |
2007-08-23 16:01:58 | admin | create | |
|