Changes between Version 24 and Version 25 of DjangoSpecifications/Core/Threading


Ignore:
Timestamp:
04/15/08 10:22:52 (7 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DjangoSpecifications/Core/Threading

    v24 v25  
    1616== Globals ==
    1717
    18 There are three types of globals:
     18There are four types of globals:
    1919 1. read-only globals that are never assigned to (THREAD-SAFE),
    2020 1. globals assigned to in a function by using the `global` keyword (NOT THREAD-SAFE),
    2121 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)
    2223
    2324"Not thread-safe" has two broad subcategories:
     
    8788||`django/template/__init__.py`||`invalid_var_format_string, libraries, builtins`||OK||duplicated module loading with `__import__` possible||
    8889||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)||||
    9091||django/utils/translation/trans_real.py||`_accepted, _active, _default, _translations`||continue review here||foo||
    9192||django/core/urlresolvers.py||`_callable_cache, _resolver_cache`||`memoize` decorator||||
Back to Top