mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[3.1.x] Improved wording in async views docs.
Backport of 41725602afebe2ddb018b99afe134384cc3bf69e from master
This commit is contained in:
parent
26ccc7701d
commit
af190bf263
@ -41,7 +41,7 @@ class-based view, this means making its ``__call__()`` method an ``async def``
|
|||||||
to ``asyncio.coroutines._is_coroutine`` so this function returns ``True``.
|
to ``asyncio.coroutines._is_coroutine`` so this function returns ``True``.
|
||||||
|
|
||||||
Under a WSGI server, async views will run in their own, one-off event loop.
|
Under a WSGI server, async views will run in their own, one-off event loop.
|
||||||
This means you can use async features, like parallel async HTTP requests,
|
This means you can use async features, like concurrent async HTTP requests,
|
||||||
without any issues, but you will not get the benefits of an async stack.
|
without any issues, but you will not get the benefits of an async stack.
|
||||||
|
|
||||||
The main benefits are the ability to service hundreds of connections without
|
The main benefits are the ability to service hundreds of connections without
|
||||||
@ -65,7 +65,7 @@ If you want to use these, you will need to deploy Django using
|
|||||||
messages about *"Synchronous middleware ... adapted"*.
|
messages about *"Synchronous middleware ... adapted"*.
|
||||||
|
|
||||||
In both ASGI and WSGI mode, you can still safely use asynchronous support to
|
In both ASGI and WSGI mode, you can still safely use asynchronous support to
|
||||||
run code in parallel rather than serially. This is especially handy when
|
run code concurrently rather than serially. This is especially handy when
|
||||||
dealing with external APIs or data stores.
|
dealing with external APIs or data stores.
|
||||||
|
|
||||||
If you want to call a part of Django that is still synchronous, like the ORM,
|
If you want to call a part of Django that is still synchronous, like the ORM,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user