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()
if __name__ == '__main__':
main()
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()
if __name__ == '__main__':
main()
本文标题:添加多线程
本文链接:https://www.haomeiwen.com/subject/cdtzhxtx.html
网友评论