使用python写一个线程安全的单例模式
摘要:
# 使用python写一个线程安全的单例模式 # 参考:https://juejin.cn/post/6844903951624585229 import threading import time def synchronized(func): func.__lock__ = threading. 阅读全文
posted @ 2022-08-10 00:57 patton88 阅读(181) 评论(0) 推荐(0) 编辑