[+] examples

This commit is contained in:
2025-04-02 13:53:27 +03:00
parent 474bcdee5a
commit 420e352745
4 changed files with 90 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
from pywinmutex import WindowsMutex
mutex = WindowsMutex("anidev/pywinmutex/simple", True) # Name may be any string
mutex.timeout = 2500 # Set a timeout of 2.5 seconds
with mutex:
print(f"[I] Mutex({mutex}) acquired.")
input("Enter to release the mutex and exit> ")
print(f"[I] Mutex({mutex}) released. Exiting...")