summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-01-11 13:00:24 +0000
committerRichard van der Hoff <richard@matrix.org>2020-01-12 21:53:47 +0000
commitda4e52544e326b707af6168a63d65eace34d8e9c (patch)
tree90a0490273fe9f5c1a2c9d56ef63ad6b5e6527fa
parentMerge pull request #6675 from matrix-org/rav/die_sqlite37_die_die_die (diff)
downloadsynapse-da4e52544e326b707af6168a63d65eace34d8e9c.tar.xz
comment for run_in_background
-rw-r--r--synapse/logging/context.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/logging/context.py b/synapse/logging/context.py
index 33b322209d..1b940842f6 100644
--- a/synapse/logging/context.py
+++ b/synapse/logging/context.py
@@ -571,6 +571,9 @@ def run_in_background(f, *args, **kwargs):
     yield or await on (for instance because you want to pass it to
     deferred.gatherResults()).
 
+    If f returns a Coroutine object, it will be wrapped into a Deferred (which will have
+    the side effect of executing the coroutine).
+
     Note that if you completely discard the result, you should make sure that
     `f` doesn't raise any deferred exceptions, otherwise a scary-looking
     CRITICAL error about an unhandled error will be logged without much