atexit + threads = bug?

skip at skip at
Fri Jan 13 05:25:53 CET 2006

    David> What would be unreasonable about adding a
    David>   join_nondaemonic_threads()
    David> call before the call to
    David>   call_sys_exitfunc()
    David> near the beginning of Py_Finalize?

    David> Instead of _MainThread.__exitfunc having to rely on
    David> atexit.register to ensure that it gets called,
    David> join_nondaemonic_threads would call _MainThread.__exitfunc (or
    David> some functional equivalent).  Both join_nondaemonic_threads and
    David> call_sys_exitfunc would execute while the interpreter "is still
    David> entirely intact", as the Py_Finalize comment says.


    David> This seems simple.  Am I overlooking something?

A patch? <0.5 wink>


More information about the Python-list mailing list