Quantcast
Channel: C# ThreadStatic + volatile members not working as expected - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Philip Daubmeier for C# ThreadStatic + volatile members not working...

The MSDN describes what the keyword volatile does here:The volatile keyword indicates that a field might be modified by multiple concurrently executing threads. Fields that are declared volatile are...

View Article



Answer by Lucero for C# ThreadStatic + volatile members not working as expected

Threads are executing at the same time. What conceptually happens is this:staticVolatileTestString += Environment.NewLine +"\tthread "+ ((int) o) +" setting threadInt to "+ newVal;Thread 1 reads...

View Article

C# ThreadStatic + volatile members not working as expected

I was reading through the tips and tricks post and I thought I'd try out some of the C# stuff that I'd never done before. Therefore, the following code serves no actual purpose, but is just a 'test...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images