summary refs log tree commit diff
path: root/synapse/storage/databases/main/lock.py
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2021-12-09 02:53:17 -0600
committerEric Eastwood <erice@element.io>2021-12-09 02:53:17 -0600
commit6b64184585b4935c75e6f4ed44ac17ca48e1f71f (patch)
tree048c8b90df46d609514b8bba2c6df5bb809225d2 /synapse/storage/databases/main/lock.py
parentMerge branch 'develop' into madlittlemods/return-historical-events-in-order-f... (diff)
parentAdd a constant for receipt types (m.read). (#11531) (diff)
downloadsynapse-6b64184585b4935c75e6f4ed44ac17ca48e1f71f.tar.xz
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
Conflicts:
	scripts-dev/complement.sh
	synapse/handlers/room_batch.py
Diffstat (limited to 'synapse/storage/databases/main/lock.py')
-rw-r--r--synapse/storage/databases/main/lock.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/lock.py b/synapse/storage/databases/main/lock.py

index 3d0df0cbd4..a540f7fb26 100644 --- a/synapse/storage/databases/main/lock.py +++ b/synapse/storage/databases/main/lock.py
@@ -13,7 +13,7 @@ # limitations under the License. import logging from types import TracebackType -from typing import TYPE_CHECKING, Dict, Optional, Tuple, Type +from typing import TYPE_CHECKING, Optional, Tuple, Type from weakref import WeakValueDictionary from twisted.internet.interfaces import IReactorCore @@ -62,7 +62,9 @@ class LockStore(SQLBaseStore): # A map from `(lock_name, lock_key)` to the token of any locks that we # think we currently hold. - self._live_tokens: Dict[Tuple[str, str], Lock] = WeakValueDictionary() + self._live_tokens: WeakValueDictionary[ + Tuple[str, str], Lock + ] = WeakValueDictionary() # When we shut down we want to remove the locks. Technically this can # lead to a race, as we may drop the lock while we are still processing.