diff options
Diffstat (limited to 'helpers/lock.py')
-rw-r--r-- | helpers/lock.py | 6 |
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 @@ | |||
1 | import threading | 1 | import threading |
2 | 2 | ||
3 | from . import debug_print | ||
4 | |||
3 | class Lock: | 5 | class 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 | ||