Assert waiters and waiter are still the same

This commit is contained in:
Unrud 2021-12-20 23:47:06 +01:00
parent 06f93a032b
commit fb3de73d1c

View File

@ -81,6 +81,7 @@ class LockDict:
yield
finally:
with self._lock:
assert waiters[0] is waiter and self._dict[key] is waiters
del waiters[0]
if waiters:
waiters[0].release()