摘要:
from threading import Thread,current_thread import time def task(): print('%s is running' % current_thread().name) time.sleep(3) print('%s is done' % 阅读全文
摘要:
方式一:导入Thread模块 from threading import Thread import time def task(name): print('%s is running' %name) time.sleep(3) if __name__ == '__main__': t=Thread 阅读全文