iclinux wrote: > hi there, > > I'm new to python, and have two questions: > > a. how to exit the whole process in a thread?
sys.exit() Works only if Thread.setDaemon(True) is invoked on all threads. > b. when thread doing a infinite loops, how to terminate the process?: > it seems that the follow doesn't work, in my Windows XP: > thread.start() > thread.join() It works. You just don't understand _how_ it works. There is no (easy, without major pain performance- and stability-wise and corner-case-free) way to terminate a thread. If you want that, use a subprocess & e.g. pyro as RPC mechanism. Diez -- http://mail.python.org/mailman/listinfo/python-list