python 线程锁 threading RLock

创建日期: 2024-08-08 15:11 | 作者: 风波 | 浏览次数: 18 | 分类: Python
import threading
mutex = threading.RLock()
try:
    mutex.acquire()
    print("hello world")
except Exception as e:
    pass
finally:
    mutex.release()
18 浏览
14 爬虫
0 评论