📅  最后修改于: 2022-03-11 14:47:07.146000             🧑  作者: Mango
代码示例1
import threading
sem = threading.Semaphore() # or sem = threading.Semaphore(value=n)
sem.acquire()
# Your code here
sem.release()