- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for berate (0.14 sec)
-
docs/features/events.md
In the preceding example we used a field, `callStartNanos`, to track the elapsed time of each event. This is handy, but it won’t work if multiple calls are executing concurrently. To accommodate this, use a `Factory` to create a new `EventListener` instance for each `Call`. This allows each listener to keep call-specific state.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 7.7K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
You can define this *startup* and *shutdown* logic using the `lifespan` parameter of the `FastAPI` app, and a "context manager" (I'll show you what that is in a second). Let's start with an example and then see it in detail. We create an async function `lifespan()` with `yield` like this: ```Python hl_lines="16 19" {!../../../docs_src/events/tutorial003.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.8K bytes - Viewed (0)