This commit is contained in:
reivilibre committed 2021-09-10 15:34:00 +00:00
1 parent 1f4f0ddf26
commit 97bd03789e
4 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -191,7 +191,7 @@ and add it to each log record.</p>
<p>Logcontexts are also used for CPU and database accounting, so that we
can track which requests were responsible for high CPU use or database
activity.</p>
<p>The <code>synapse.logging.context</code> module provides a facilities for managing
<p>The <code>synapse.logging.context</code> module provides facilities for managing
the current log context (as well as providing the <code>LoggingContextFilter</code>
class).</p>
<p>Asynchronous functions make the whole thing complicated, so this document describes
@@ -468,7 +468,7 @@ and the awaitable chain is now orphaned, and will be garbage-collected at
some point. Note that <code>await_something_interesting</code> is a coroutine,
which Python implements as a generator function. When Python
garbage-collects generator functions, it gives them a chance to
clean up by making the <code>async</code> (or <code>yield</code>) raise a <code>GeneratorExit</code>
clean up by making the <code>await</code> (or <code>yield</code>) raise a <code>GeneratorExit</code>
exception. In our case, that means that the <code>__exit__</code> handler of
<code>PreserveLoggingContext</code> will carefully restore the request context, but
there is now nothing waiting for its return, so the request context is