mirror of
https://github.com/django/django.git
synced 2025-04-15 21:04:36 +00:00
Until we add support for truly asynchronous database backends it's actually detrimental to have complete set retrieval require multiple hops between sync and async emulated contexts via asgiref. By defaulting to sending the whole sync _fetch_all() to the current context thread pool we reduce unncessary work when dealing with large result sets since the queryset cannot be iterated anyway before all results are retrieved and cached.