forked-synapse/synapse/util
Richard van der Hoff f22e7cda2c Fix a class of logcontext leaks
So, it turns out that if you have a first `Deferred` `D1`, you can add a
callback which returns another `Deferred` `D2`, and `D2` must then complete
before any further callbacks on `D1` will execute (and later callbacks on `D1`
get the *result* of `D2` rather than `D2` itself).

So, `D1` might have `called=True` (as in, it has started running its
callbacks), but any new callbacks added to `D1` won't get run until `D2`
completes - so if you `yield D1` in an `inlineCallbacks` function, your `yield`
will 'block'.

In conclusion: some of our assumptions in `logcontext` were invalid. We need to
make sure that we don't optimise out the logcontext juggling when this
situation happens. Fortunately, it is easy to detect by checking `D1.paused`.
2018-05-02 11:58:00 +01:00
..
caches Merge pull request #3093 from matrix-org/rav/response_cache_wrap 2018-04-20 11:31:17 +01:00
__init__.py Use deferred.addTimeout instead of time_bound_deferred 2018-04-23 00:53:18 +01:00
async.py Merge branch 'develop' into py3-xrange-1 2018-04-30 01:02:25 +01:00
distributor.py Remove preserve_context_over_{fn, deferred} 2017-11-14 11:22:42 +00:00
file_consumer.py Use run_in_background in preference to preserve_fn 2018-04-27 12:55:51 +01:00
frozenutils.py Use static JSONEncoders 2018-03-29 23:13:33 +01:00
httpresourcetree.py more bytes strings 2018-04-29 00:13:57 +02:00
jsonobject.py Handle sending events and device messages over federation 2016-11-17 15:48:04 +00:00
logcontext.py Fix a class of logcontext leaks 2018-05-02 11:58:00 +01:00
logformatter.py replace stringIO imports 2018-04-28 13:46:23 +02:00
logutils.py Fix up logcontexts 2016-02-08 14:26:45 +00:00
manhole.py Add a metrics listener and a ssh listener to the pusher 2016-04-25 17:34:25 +01:00
metrics.py Revert "Merge pull request #3066 from matrix-org/rav/remove_redundant_metrics" 2018-04-09 12:59:12 +01:00
module_loader.py pep8 2017-09-26 19:21:41 +01:00
msisdn.py Support registration / login with phone number 2017-03-13 17:27:51 +00:00
ratelimitutils.py Use run_in_background in preference to preserve_fn 2018-04-27 12:55:51 +01:00
retryutils.py Use run_in_background in preference to preserve_fn 2018-04-27 12:55:51 +01:00
rlimit.py Move the versionstring code out of app.homeserver into util 2016-04-11 14:57:09 +01:00
stringutils.py Move more xrange to six 2018-04-28 13:57:00 +02:00
threepids.py fix PR nitpicking 2018-01-19 18:23:45 +00:00
versionstring.py Add federation /version API 2016-08-05 16:36:07 +01:00
wheel_timer.py Move more xrange to six 2018-04-28 13:57:00 +02:00