Changes between Version 26 and Version 27 of DjangoSpecifications/Core/Threading


Ignore:
Timestamp:
Apr 15, 2008, 10:39:05 AM (17 years ago)
Author:
mrts
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DjangoSpecifications/Core/Threading

    v26 v27  
    1313
    1414There are four types of globals:
    15  1. read-only globals that are never assigned to (THREAD-SAFE),
    16  1. globals assigned to in a function by using the `global` keyword (NOT THREAD-SAFE),
    17  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).
    18  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)
     15 1. globals that are assigned to at module level and never modified later (THREAD-SAFE),
     16 1. globals that are assigned to at module level and whose elements are modified with module level code, but never modified later (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)
     17 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),
     18 1. globals assigned to in functions by using the `global` keyword (NOT THREAD-SAFE),
    1919
    2020"Not thread-safe" has two broad subcategories:
Back to Top