summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-10-17 10:59:30 +0100
committerRichard van der Hoff <richard@matrix.org>2017-10-17 10:59:30 +0100
commit2e9f5ea31a9c66eceb6276c5241cc6537cb0ae4c (patch)
tree1c46f1f9dc95d3617d1d8c04847c5dbda0321b20 /synapse/util
parentMerge pull request #2544 from matrix-org/luke/groups-invited-users (diff)
downloadsynapse-2e9f5ea31a9c66eceb6276c5241cc6537cb0ae4c.tar.xz
Fix logcontext handling for persist_events
* don't use preserve_context_over_deferred, which is known broken.

* remove a redundant preserve_fn.

* add/improve some comments
Diffstat (limited to '')
-rw-r--r--synapse/util/async.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/util/async.py b/synapse/util/async.py
index 0fd5b42523..a0a9039475 100644
--- a/synapse/util/async.py
+++ b/synapse/util/async.py
@@ -53,6 +53,11 @@ class ObservableDeferred(object):
 
     Cancelling or otherwise resolving an observer will not affect the original
     ObservableDeferred.
+
+    NB that it does not attempt to do anything with logcontexts; in general
+    you should probably make_deferred_yieldable the deferreds
+    returned by `observe`, and ensure that the original deferred runs its
+    callbacks in the sentinel logcontext.
     """
 
     __slots__ = ["_deferred", "_observers", "_result"]