Changeset 399
- Timestamp:
- 07/21/08 11:04:43 (4 months ago)
- Files:
-
- trunk/tools/tools/threads.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tools/tools/threads.d
r398 r399 84 84 private static void check(string s, int i) { if (i) throw new Exception(Format(s, " failed : ", i, "!")); } 85 85 void set(Ref r) { 86 check("set:TlsSetValue", TlsSetValue(key, cast(void*) r));86 if (!TlsSetValue(key, cast(void*) r)) throw new Exception("set:TlsSetValue failed!"); 87 87 } 88 88 Ref check() { return cast(Ref) cast(void*) TlsGetValue(key); } … … 92 92 res = maker(); 93 93 synchronized(this) values ~= res; 94 if (!TlsSetValue(key, cast(void*) res)) throw new Exception("ptr:TlsSetValue failed ");94 if (!TlsSetValue(key, cast(void*) res)) throw new Exception("ptr:TlsSetValue failed!"); 95 95 } 96 96 return res;
