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
This commit is contained in:
Richard van der Hoff 2017-10-17 10:59:30 +01:00
parent e0a75e0c25
commit 2e9f5ea31a
2 changed files with 22 additions and 7 deletions

View file

@ -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"]