示例
from threading import Thread, get_ident
import time
def task(num):
print(get_ident(), "开始运行", num)
time.sleep(1)
print(get_ident(), "结束运行")
for i in range(5):
t = Thread(target=task, args=(i,))
t.start()