GitLab will be upgraded on June 23th evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 0927f41f authored by payno's avatar payno

fix d9d959ea. In fact can try to acquire...

fix d9d959ea. In fact can try to acquire several time the same lock but only one can remove it
parent 7eea5fbc
Pipeline #46586 passed with stages
in 14 minutes and 28 seconds
......@@ -98,13 +98,14 @@ class SharedLockPool:
lock = locks.get(name, None)
if lock is None:
locks[name] = lock = threading.RLock()
lock.acquire()
lock.acquire()
try:
yield
finally:
lock.release()
with self._modify_locks() as locks:
locks.pop(name)
if name in locks:
locks.pop(name)
@contextmanager
def acquire_context_creation(self, name, contextmngr, *args, **kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment