86 | | ||django/template/loaders/app_directories.py||`app_template_dirs`||MODULE LEVEL INIT (probably OK)|||| |
87 | | ||django/utils/translation/trans_real.py||`_accepted, _active, _default, _translations`||continue review here||foo|| |
88 | | ||django/core/urlresolvers.py||`_callable_cache, _resolver_cache`||`memoize` decorator|||| |
89 | | ||`django/core/serializers/__init__.py`||`_serializers`|||||| |
90 | | ||django/db/models/fields/related.py||`pending_lookups`|||||| |
91 | | ||django/db/transaction.py||`dirty, state`|||||| |
92 | | ||django/dispatch/dispatcher.py||`connections, senders, sendersBack|||||| |
| 86 | ||django/template/loaders/app_directories.py||`app_template_dirs`||MODULE LEVEL INIT|||| |
| 87 | ||django/utils/translation/trans_real.py||`_accepted, _active, _default, _translations`||OK||explicit threading support, no inefficiencies|| |
| 88 | ||django/core/urlresolvers.py||`_callable_cache, _resolver_cache`||`memoize` decorator||duplicated module loading with `__import__` possible|| |
| 89 | ||`django/core/serializers/__init__.py`||`_serializers`||PROBLEM, incomplete init in `_load_serializers`|||| |
| 90 | ||django/db/models/fields/related.py||`pending_lookups`||OK?, needs further review||`append()` in `add_lazy_relation()` can add duplicated values, which may or may not confuse `pop()` in `do_pending_lookups()`|| |
| 91 | ||django/db/transaction.py||`dirty, state`||OK||explicit threading support, no inefficiencies|| |
| 92 | ||django/dispatch/dispatcher.py||`connections, senders, sendersBack||not reviewed|||| |
| 93 | |
| 94 | === Problems === |
| 95 | |
| 96 | 1. django/template/loader.py: the "bad" algorithm above, patch attached to #6950 |
| 97 | 1. django/core/serializers/__init__.py: `_load_serializers()` is unsafe, patch attached to #FIXME: |
| 98 | {{{ |
| 99 | 1. thread 1: if not _serializers: true --> _load_serializers(), enter for loop |
| 100 | 2. thread 1: register_serializer(x) |
| 101 | 3. thread 2: if not _serializers: false --> use incomplete _serializers |
| 102 | 3. thread 1: register_serializer(y) |
| 103 | }}} |
| 104 | 1. django/db/models/fields/related.py: `append()` in `add_lazy_relation()` can add duplicated values, which may or may not confuse `pop()` in `do_pending_lookups()` |