We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77a3138 commit 24ef7b1Copy full SHA for 24ef7b1
1 file changed
modules/singleton.py
@@ -55,4 +55,9 @@ def release(app_id: str):
55
import singleton # This script is designed as a module you import
56
singleton.lock("SomeCoolProgram")
57
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
63
# Credits for the basic functionality go to this answer on stackoverflow https://stackoverflow.com/a/66002139
0 commit comments