mirror of
https://github.com/SantaSpeen/winmutex.git
synced 2026-04-20 07:10:36 +00:00
[>] pywinmutex > winmutex
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from pywinmutex import WindowsMutex
|
||||
from winmutex import WindowsMutex
|
||||
|
||||
mutex = WindowsMutex("anidev/pywinmutex/acquire", True) # Name may be any string
|
||||
mutex = WindowsMutex("anidev/winmutex/acquire", True) # Name may be any string
|
||||
|
||||
if not mutex.acquire(5000): # Acquire the mutex with a timeout of 5 seconds; None for no timeout
|
||||
print(f"[W] Mutex({mutex}) already exists or acquire timeout exceeded.")
|
||||
|
||||
Reference in New Issue
Block a user