#32889: Use asgiref ThreadSensitiveContext to allow per-request sync threads.
-------------------------------------+-------------------------------------
     Reporter:  Carlton Gibson       |                    Owner:  Allan
         Type:                       |  Feldman
  Cleanup/optimization               |                   Status:  closed
    Component:  HTTP handling        |                  Version:  4.0
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  async, asgi          |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton.gibson@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"36fa071d6ebd18a61c4d7f1b5c9d17106134bd44" 36fa071]:
 {{{
 #!CommitTicketReference repository=""
 revision="36fa071d6ebd18a61c4d7f1b5c9d17106134bd44"
 Fixed #32889 -- Allowed per-request sync_to_async context in ASGIHandler .

 By using a asgiref's ThreadSensitiveContext context manager, requests
 will be able to execute independently of other requests when sync work
 is involved.

 Prior to this commit, a single global thread was used to execute any
 sync work independent of the request from which that work was scheduled.
 This could result in contention for the global sync thread in the case
 of a slow sync function.

 Requests are now isolated to their own sync thread.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32889#comment:2>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/071.ce13a7fb2e73dee75c73313c16581568%40djangoproject.com.

Reply via email to