Changes between Initial Version and Version 1 of Ticket #1463
- Timestamp:
- Oct 19, 2010, 9:16:49 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1463
- Property Owner set to
-
Ticket #1463 – Description
initial v1 1 See the CriticalSection.h in \MgDev\OS\Common\CoordinateSystem:1 See the !CriticalSection.h in \!MgDev\OS\Common\!CoordinateSystem: 2 2 3 There exists the class CustomCriticalSection and a static variable of that class is defined, too.3 There exists the class !CustomCriticalSection and a static variable of that class is defined, too. 4 4 5 [static CustomCriticalSection CriticalClass;] 5 {{{ 6 static CustomCriticalSection CriticalClass; 7 }}} 6 8 7 This one has internal linkage, however; i.e. each object file this header is compiled into, will have it's own instance of [CriticalClass].9 This one has internal linkage, however; i.e. each object file this header is compiled into, will have it's own instance of !CriticalClass. 8 10 9 The problem surfaces, when trying to read all available coordinate systems from multiple threads. The Mg API will eventually fail, because CsMap is not thread-safe.11 The problem surfaces, when trying to read all available coordinate systems from multiple threads. The Mg API will eventually fail, because !CsMap is not thread-safe. 10 12 11 Originally, only one instance existed only.13 Originally, only one instance existed. 12 14 13 The attached patch moves the [CustomCriticalSection CriticalClass]into a separate source file and declares it [extern] in the header.15 The attached patch moves the !CriticalClass into a separate source file and declares it [extern] in the header.