trying to kill threads

Laura Creighton lac at strakt.com
Fri Feb 7 18:56:00 EST 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
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list

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.
http://groups.google.com/groups?q=g:thl4176793104d&dq=&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=b0r1ds%2410s0fi%241%40hades.rz.uni-sb.de

from 2 weeks ago about this.  

good luck,
Laura






More information about the Python-list mailing list