[Django] #26240: docs about cached.Loader thread safety unclear

4 views
Skip to first unread message

Django

unread,
Feb 19, 2016, 2:30:15 AM2/19/16
to django-...@googlegroups.com
#26240: docs about cached.Loader thread safety unclear
-------------------------------+--------------------
Reporter: TZanke | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Hello,

in the documentation about the cached template loader, a warning box
informs about thread safety concerns with template tags if using the
cached template loader.
https://docs.djangoproject.com/en/1.9/ref/templates/api/#django.template.loaders.cached.Loader

After locking into the code of the loader i could not find anything
related to multi thread template loading or anything like that.
https://github.com/django/django/blob/master/django/template/loaders/cached.py

So i think the cached loader is safe in a non-multi thread Django setup.
The warning in the documentation is only relevant for multi thread setups
of Django.

My recommendation:

Update the cached loader warning in the documentation to make clear, this
only applies to multi thread Django setups.

--
Ticket URL: <https://code.djangoproject.com/ticket/26240>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 19, 2016, 3:46:44 PM2/19/16
to django-...@googlegroups.com
#26240: docs about cached.Loader thread safety unclear
-------------------------------+--------------------------------------
Reporter: TZanke | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timgraham):

* status: new => closed
* needs_better_patch: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_docs: => 0


Comment:

If you click through to the "for more information" link, it does say,
"Since Django is sometimes run in multi-threaded..." This seems fine to
me.

--
Ticket URL: <https://code.djangoproject.com/ticket/26240#comment:1>

Reply all
Reply to author
Forward
0 new messages