#36863: Under WSGI, multiple calls to asgiref.sync.async_to_sync within the same
request do not share the same event loop.
-------------------------------------+-------------------------------------
     Reporter:  Mykhailo Havelia     |                     Type:  Bug
       Status:  new                  |                Component:  HTTP
                                     |  handling
      Version:  6.0                  |                 Severity:  Normal
     Keywords:  async, wsgi          |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 Each call creates a new thread with its own event loop. This commonly
 happens in middlewares and signals, causing a single request to spawn
 multiple threads and event loops, which is unnecessary and prevents reuse
 of async resources.

 This could be addressed by introducing a per-request async context, for
 example as shown in this draft implementation:
 https://github.com/Arfey/django/pull/5/changes
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36863>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019bbca9d178-b3a77764-1d62-47ba-8b88-3168cfed96ec-000000%40eu-central-1.amazonses.com.

Reply via email to