python多线程简单例子
作者:vpoet
mail:vpoet_sir@163.com
import thread
def childthread(threadid):
print "I am child thread",threadid def parentthread():
i=0
while 1:
i+=1
thread.start_new_thread(childthread,(i,))
if raw_input()=='q':
break parentthread()
运行截图: