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 threads by catching the kill signal in a
traceback. This method is summed up in Connelly Barnes's informal
KThread module:
http://www.google.com/groups?q=KThre...hon.org&rnum=1
Note it won't work in all cases, as it can't kill a thread that's made a
blocking system call. However, it may come in useful.