P
Peter Morris
Is this test case accurate?
bool someResult = false;
var thread = new Thread( () => someResult = true );
thread.Start();
thread.Join();
thread.MemoryBarrier();
Assert.IsTrue(someResult);
I ask because I don't want to make someResult a member of my class just so
that I can make it volatile (it's a test case, I don't want to pollute the
class with members that are used for a single test method).
Thanks
Pete
bool someResult = false;
var thread = new Thread( () => someResult = true );
thread.Start();
thread.Join();
thread.MemoryBarrier();
Assert.IsTrue(someResult);
I ask because I don't want to make someResult a member of my class just so
that I can make it volatile (it's a test case, I don't want to pollute the
class with members that are used for a single test method).
Thanks
Pete