Killing threads during development.

Don Garrett dongar37 at gmail.com
Sun Jun 5 22:41:17 CEST 2005


  I've been developing with external multi-threaded libraries recently.
I find it difficult to use the Python prompt to experiment with these
libraries because there isn't any way to just shutdown all threads and
try things again.

  If I try to exit the prompt with background threads running, then
Python hangs and I have to kill the process to exit. Ctrl C won't do
it.

  Is there some way to brutally kill all background threads? Just for
development purposes?

Note:
  This isn't an insurmountable problem. If I write test scripts and run
them from the command line I can still kill them easily. I just find it
frustrating not be to able to explore interactively while working with
a new library.




More information about the Python-list mailing list