diff options
author | David Lord <davidism@gmail.com> | 2021-05-18 13:22:46 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2021-05-18 13:22:46 -0700 |
commit | 7d0b7accff32e0ce9889fb8b81320917451b8454 (patch) | |
tree | 74ea646fb8be8d89dbd6ff8ba65123c023359a75 /docs | |
parent | 94a6423a7710959912bde61d16d88d353b3312bb (diff) | |
download | jinja2-7d0b7accff32e0ce9889fb8b81320917451b8454.tar.gz |
use asyncio.run
Diffstat (limited to 'docs')
-rw-r--r-- | docs/api.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/api.rst b/docs/api.rst index 127e2b8..9c6f3a1 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -513,12 +513,12 @@ handle async and sync code in an asyncio event loop. This has the following implications: - Template rendering requires an event loop to be available to the - current thread. :func:`asyncio.get_event_loop` must return an event - loop. + current thread. :func:`asyncio.get_running_loop` must return an + event loop. - The compiled code uses ``await`` for functions and attributes, and uses ``async for`` loops. In order to support using both async and sync functions in this context, a small wrapper is placed around - all calls and access, which add overhead compared to purely async + all calls and access, which adds overhead compared to purely async code. - Sync methods and filters become wrappers around their corresponding async implementations where needed. For example, ``render`` invokes |