Skip to content

Commit 24ef7b1

Browse files
committed
Update singleton gist
1 parent 77a3138 commit 24ef7b1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

modules/singleton.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,9 @@ def release(app_id: str):
5555
import singleton # This script is designed as a module you import
5656
singleton.lock("SomeCoolProgram")
5757

58+
print("Do some very cool stuff")
59+
60+
# Release usually happens automatically on exit, but call this to be sure
61+
singleton.release("SomeCoolProgram")
62+
5863
# Credits for the basic functionality go to this answer on stackoverflow https://stackoverflow.com/a/66002139

0 commit comments

Comments
 (0)