trying to kill threads

Laura Creighton lac at
Sat Feb 8 00:56:00 CET 2003

> I'm trying to figure out how to kill a python thread in a way that won't 
> trash the interpreter or memory. I have a program that allows a user to use 
> our pre-defined python functions to create threads and run his/her own 
> function. But when the stop button is pressed, I want to get rid of the 
> threads the user created fairly quickly. 
> I'm sure every understands the futility of using kill() with python.
> Any suggestions?
> Thanks,
> Anton
> -- 

You cannot stand outside a thread and kill it.  You must arrange for
your thread to cooperate.  It must know how to commit suicide, and you
must have a way to communicate to it 'die now'.  See this thread.

from 2 weeks ago about this.  

good luck,

More information about the Python-list mailing list