#32889: Use asgiref ThreadSensitiveContext to allow per-request sync threads.
-------------------------------------+-------------------------------------
Reporter: Carlton | Owner: Allan Feldman
Gibson |
Type: | Status: assigned
Cleanup/optimization |
Component: HTTP | Version: 4.0
handling |
Severity: Normal | Keywords: async, asgi
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
[https://github.com/django/asgiref/pull/227/files# asgiref 3.3.2 added
ThreadSensitiveContext] allowing `sync_to_async(thread_sensitive=True)` to
be scoped per-request, rather than globally.
With Django 4.0 being 3.8+ the required `contextvars` module is available.
Adjust `ASGIHandler` to use `ThreadSensitiveContext`
[https://github.com/django/django/pull/13882 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32889>
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/056.962d0705138256e63ff98b6782c76b01%40djangoproject.com.