首页 > 代码库 > 互斥锁

互斥锁

import threading

创建锁

mutex = threating.lock()

上锁

mutex.acquire.lock()

释放锁

mutex,release.lock()


from threading import lock

from threading import Thread

 

互斥锁