Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit ffcbf18

Browse files
committed
Better compatibility for cache locks.
1 parent 9b6cff1 commit ffcbf18

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/iota/crypto/addresses.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,8 @@ def acquire_lock(self):
5959
Note: Acquire lock before checking the cache, and do not release it
6060
until after the cache hit/miss is resolved.
6161
"""
62-
self._lock.acquire()
63-
try:
62+
with self._lock:
6463
yield
65-
finally:
66-
self._lock.release()
6764

6865
@abstract_method
6966
def set(self, seed, index, address):

0 commit comments

Comments
 (0)