Changeset 365

Show
Ignore:
Timestamp:
06/23/08 20:12:13 (5 months ago)
Author:
FeepingCreature
Message:
  • More win32 fixes
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/tools/threads.d

    r364 r365  
    8787      } 
    8888      Ref ptr() { 
    89         Ref res
    90         if (!res=cast(Ref) cast(void*) TlsGetValue(key)) { 
     89        auto res = cast(Ref) cast(void*) TlsGetValue(key)
     90        if (!res) { 
    9191          res = maker(); 
    92           values ~= res; 
     92          synchronized values ~= res; 
    9393          check("TlsSetValue", TlsSetValue(key, cast(void*) res)); 
    9494        } 
     
    207207        if (!res) { 
    208208          res = maker(); 
    209           values ~= res; 
     209          synchronized values ~= res; 
    210210          check("pthread_setspecific", pthread_setspecific(key, cast(void*) res)); 
    211211        }