#10470: Core handlers are not threadsafe -------------------------------------+-------------------------------------- Reporter: tdterry | Owner: tdterry Status: assigned | Milestone: Component: Core framework | Version: 1.0 Resolution: | Keywords: wsgi, basehandler, mod_python, threadsafe, threading Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------------+-------------------------------------- Changes (by mrts):
* keywords: wsgi, basehandler, mod_python, threadsafe => wsgi, basehandler, mod_python, threadsafe, threading * stage: Unreviewed => Accepted Comment: shai, tuple assignment is not atomic, so the suggestion does not help. The patch looks OK, although, strictly speaking, temporary list is only required for `_request_middleware` as only that is checked in client code (i.e. only that serves as initialization guard, not the other lists). It would make things a bit less opaque if a `_middleware_not_loaded` boolean property was added to `BaseHandler` (that would do the very same `return self._request_middleware is None`) and used throughout client code. It may make sense to avoid this for optimization though, method call would add quite a few bytecode instructions. -- Ticket URL: <http://code.djangoproject.com/ticket/10470#comment:4> Django <http://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 post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---