Cannot start a thread in atexit callback

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed May 6 07:18:41 CEST 2009


En Tue, 05 May 2009 23:52:25 -0300, Zac Burns <zac256 at gmail.com> escribió:

> It seems that one cannot start a thread in an atexit callback.
>
> My use case is that I have a IO heavy callback that I want to run in a
> thread so that other callbacks can finish while it's doing it's thing
> to save on exit time.

Try creating the thread when the program begins, but locked. And release  
the lock when your programs is about to finish.

-- 
Gabriel Genellina




More information about the Python-list mailing list