aboutsummaryrefslogtreecommitdiff
path: root/helpers/lock.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/lock.py')
-rw-r--r--helpers/lock.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/helpers/lock.py b/helpers/lock.py
index 85d281a..9beafcd 100644
--- a/helpers/lock.py
+++ b/helpers/lock.py
@@ -1,5 +1,7 @@
1import threading 1import threading
2 2
3from . import debug_print
4
3class Lock: 5class Lock:
4 def __init__(self, lock_type): 6 def __init__(self, lock_type):
5 self.type = lock_type 7 self.type = lock_type
@@ -12,10 +14,10 @@ class Lock:
12 self.release(*args, **kwargs) 14 self.release(*args, **kwargs)
13 15
14 def acquire(self, *args, **kwargs): 16 def acquire(self, *args, **kwargs):
15 #print("acquiring lock for {}".format(self.type)) 17 #debug_print("acquiring lock for {}".format(self.type))
16 self.lock.acquire(*args, **kwargs) 18 self.lock.acquire(*args, **kwargs)
17 19
18 def release(self, *args, **kwargs): 20 def release(self, *args, **kwargs):
19 #print("releasing lock for {}".format(self.type)) 21 #debug_print("releasing lock for {}".format(self.type))
20 self.lock.release(*args, **kwargs) 22 self.lock.release(*args, **kwargs)
21 23