русский
Germany.ruForen → Архив Досок→ Programmierung

​ThreadStatic - уперся не пойму во что...

04.10.17 22:27
Re: ​ThreadStatic - уперся не пойму во что...
 
Программист коренной житель
in Antwort Murr 04.10.17 18:28, Zuletzt geändert 04.10.17 22:29 (Программист)

Может бать потому что ThreadStatic остается статиком только в пределах одного потока? А в другом потоке имеет другое значение?


A static field marked with T:System.ThreadStaticAttribute is not shared between threads. Each executing thread has a separate instance of the field, and independently sets and gets values for that field. If the field is accessed on a different thread, it will contain a different value.
 

Sprung zu