import time
import threading
import logging
FORMAT = "%(asctime)s %(threadName)s %(thread)d %(message)s"
logging.basicConfig(format=FORMAT, level=logging.INFO)
def worker():
logging.info('in worker')
time.sleep(2)
t = threading.Timer(5, worker)
t.setName('w1')
# t.cancel() # 尝试减少等待时间对比
t.start()
print(threading.enumerate())
# t.cancel() # 尝试取消注释对比
time.sleep(8) # 尝试减少等待时间对比
print(threading.enumerate())
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款