0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-13 15:53:26 +01:00

Fix 2 typos in docs/log_contexts.md (#10795)

This commit is contained in:
reivilibre 2021-09-10 16:33:36 +01:00 committed by GitHub
parent 63f28e4a0c
commit ceab5a4bfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/10795.doc Normal file
View file

@ -0,0 +1 @@
Correct 2 typographical errors in the *Log Contexts* documentation.

View file

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