summary refs log tree commit diff
path: root/synapse/util/async_helpers.py
diff options
context:
space:
mode:
authorPatrick Cloke <patrickc@matrix.org>2023-11-08 07:45:34 -0500
committerPatrick Cloke <patrickc@matrix.org>2023-11-08 07:45:34 -0500
commitb77c9c3f735cfaf7ecab624a72d02dfe302dbe90 (patch)
tree03ec9900056e384a2a4d0ea0a9ae11ef533b0059 /synapse/util/async_helpers.py
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parentAvoid updating the same rows multiple times with simple_update_many_txn. (#16... (diff)
downloadsynapse-b77c9c3f735cfaf7ecab624a72d02dfe302dbe90.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/util/async_helpers.py')
-rw-r--r--synapse/util/async_helpers.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/synapse/util/async_helpers.py b/synapse/util/async_helpers.py

index 0cbeb0c365..8a55e4e41d 100644 --- a/synapse/util/async_helpers.py +++ b/synapse/util/async_helpers.py
@@ -345,6 +345,7 @@ async def yieldable_gather_results_delaying_cancellation( T1 = TypeVar("T1") T2 = TypeVar("T2") T3 = TypeVar("T3") +T4 = TypeVar("T4") @overload @@ -380,6 +381,19 @@ def gather_results( ... +@overload +def gather_results( + deferredList: Tuple[ + "defer.Deferred[T1]", + "defer.Deferred[T2]", + "defer.Deferred[T3]", + "defer.Deferred[T4]", + ], + consumeErrors: bool = ..., +) -> "defer.Deferred[Tuple[T1, T2, T3, T4]]": + ... + + def gather_results( # type: ignore[misc] deferredList: Tuple["defer.Deferred[T1]", ...], consumeErrors: bool = False,