I'm using the threading module to accomplish some distributed processing on a project, and have a basic (I hope) question that I can't find an answer to elsewhere.
I've noted that there's a lot of documentation saying that there is no external way to stop a thread, and yet when creating a thread through the threading module I can see that it has a method called _Thread__stop, which does indeed stop it. Is this in any way dangerous ( i.e. doesn't actually stop the thread, or causes other thread timing issues down the road?) Or is there some other reason that there is officially no stop method?
The code would be basically:
t = threading.Thread (None, some_function)
t.start()
#Let t run for a while
t._Thread__stop()
Is this dangerous to a system using several many threads (100 max)?
Thanks,
J.C.Sackett
-- http://mail.python.org/mailman/listinfo/python-list