添加线程

import threading

def thread_job():
    print("This is an added Thread,number is %s"% threading.current_thread())

def main():
#添加线程 added_thread =threading.Thread(target=thread_job) added_thread.start() #线程的数量 #print(threading.active_count()) #线程分别是什么 #print(threading.enumerate()) #现在运行的线程是哪个 #print(threading.current_thread()) if __name__=="__main__": main()

  

posted @ 2018-12-06 12:48  萧白白  阅读(254)  评论(0编辑  收藏  举报