threads and sys.exit()

Diez B. Roggisch deets at nospam.web.de
Mon Apr 24 13:15:19 EDT 2006


gangesmaster wrote:

> calling sys.exit() from a thread does nothing... the thread dies, but
> the interpreter remains. i guess the interpreter just catches and
> ignore the SystemExit exception...
> 
> does anybody know of a way to overcome this limitation?

Use Thread.setDaemon(True) on your threads.

diez



More information about the Python-list mailing list