Message87389
Hello
I once was rather confused, because nothing in the sys and os modules
mentionned the behaviours that the exit() and _exit() functions were
supposed to have when called inside a non-main thread.
I've eventually found in multithreading-related docs that sys.exit()
made only the calling thread exit (without affecting the other threads
and the application), and I've eventually guessed that on the other
side, os._exit() always terminated the application wthout caring about
other threads or open files etc.
But I don't know if this will always be the case, or if using other
threading libraries than the standard one might change this semantics.
And concerning return code, I've found nothing indicating what happened
when different threads returned different codes. My experiments show
that only the main thread's return code is taken into account, but maybe
it's platform dependent (I'm on windows vista) ?
So well, maybe we should add in the doc of sys and os some comments
about multithreading and returning codes, even if it is to say that
those are implementation details or platform dependant B-)
Regards,
pascal |
|
Date |
User |
Action |
Args |
2009-05-07 18:53:15 | pakal | set | recipients:
+ pakal, georg.brandl |
2009-05-07 18:53:15 | pakal | set | messageid: <1241722395.44.0.880118568656.issue5962@psf.upfronthosting.co.za> |
2009-05-07 18:53:14 | pakal | link | issue5962 messages |
2009-05-07 18:53:13 | pakal | create | |
|