Changes between Version 24 and Version 25 of DjangoSpecifications/Core/Threading
- Timestamp:
- Apr 15, 2008, 10:22:52 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DjangoSpecifications/Core/Threading
v24 v25 16 16 == Globals == 17 17 18 There are threetypes of globals:18 There are four types of globals: 19 19 1. read-only globals that are never assigned to (THREAD-SAFE), 20 20 1. globals assigned to in a function by using the `global` keyword (NOT THREAD-SAFE), 21 21 1. global mutable data structures (lists and dictionaries, also instances) that are assigned to at module level but whose elements are modified in functions and that are accessed without using the `global` keyword (NOT THREAD-SAFE unless never modified). 22 1. globals that are initialized with module level code (PROBABLY THREAD-SAFE, although elementwise modification at module level is not thread-safe ''per se'', the module is most likely cached ''before'' threads get access to it) 22 23 23 24 "Not thread-safe" has two broad subcategories: … … 87 88 ||`django/template/__init__.py`||`invalid_var_format_string, libraries, builtins`||OK||duplicated module loading with `__import__` possible|| 88 89 ||django/template/loader.py||`template_source_loaders`||PROBLEM, see #6950, patch attached||duplicated module loading with `__import__` possible|| 89 ||django/template/loaders/app_directories.py||`app_template_dirs`|| PROBABLY OK, appending to list at module level is not thread-safe, but the module is most likely cached ''before'' threads get access to it||||90 ||django/template/loaders/app_directories.py||`app_template_dirs`||MODULE LEVEL INIT (probably OK)|||| 90 91 ||django/utils/translation/trans_real.py||`_accepted, _active, _default, _translations`||continue review here||foo|| 91 92 ||django/core/urlresolvers.py||`_callable_cache, _resolver_cache`||`memoize` decorator||||