summary refs log tree commit diff
path: root/synapse/util/async.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-30 00:34:28 +0100
committerGitHub <noreply@github.com>2018-04-30 00:34:28 +0100
commitaab2e4da60a11de3d84e9a603077cc43386db1f4 (patch)
treef3b6b59408b7ca4cd16925ff7f1f50785032872b /synapse/util/async.py
parentMerge pull request #3156 from NotAFile/py3-hmac-bytes (diff)
parentpep8; remove spurious import (diff)
downloadsynapse-aab2e4da60a11de3d84e9a603077cc43386db1f4.tar.xz
Merge pull request #3140 from matrix-org/rav/use_run_in_background
Use run_in_background in preference to preserve_fn
Diffstat (limited to 'synapse/util/async.py')
-rw-r--r--synapse/util/async.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/async.py b/synapse/util/async.py
index 1df5c5600c..4a762d1e72 100644
--- a/synapse/util/async.py
+++ b/synapse/util/async.py
@@ -19,7 +19,7 @@ from twisted.internet.defer import CancelledError
 from twisted.python import failure
 
 from .logcontext import (
-    PreserveLoggingContext, make_deferred_yieldable, preserve_fn
+    PreserveLoggingContext, make_deferred_yieldable, run_in_background
 )
 from synapse.util import logcontext, unwrapFirstError
 
@@ -163,7 +163,7 @@ def concurrently_execute(func, args, limit):
             pass
 
     return logcontext.make_deferred_yieldable(defer.gatherResults([
-        preserve_fn(_concurrently_execute_inner)()
+        run_in_background(_concurrently_execute_inner)
         for _ in xrange(limit)
     ], consumeErrors=True)).addErrback(unwrapFirstError)