Leon wrote:
if class A(
use threading,thread module
) to produce 100 thread,how to drop its (100 thread) when its running
As Roggisch suggests, the cleanest way is if the thread kills itself
once signaled by an exit condition. However, there is a non-orthodox way
of pseudo-forcibly killing threa
Hi !
The best method, it is the suicide (of the threads).
--
http://mail.python.org/mailman/listinfo/python-list
This reply is off topic but I couldn't resist:
The best way to get rid of thread is to adopt a kitten.
In fact, one of my cats is named Snobol because she is such a good string
manipulator.
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
Leon wrote:
if class A(
use threading,thread module
) to produce 100 thread,how to drop its (100 thread) when its running
By exiting. There is no other way to stop a thread by force.
Note that even trying to exit won't work, if the threads are not
marked as "daemon" threa
Leon wrote:
> if class A(
> use threading,thread module
> ) to produce 100 thread,how to drop its (100 thread) when its running
By exiting. There is no other way to stop a thread by force. Of course you
can write a run()-method like this:
def run(self):
while self.running_condition:
if class A(
use threading,thread module
) to produce 100 thread,how to drop its (100 thread) when its running
--
http://mail.python.org/mailman/listinfo/python-list