"Basic Coherency Example"

private static int sharedState = 0;

private static void ThreadOneStart() {
	sharedState = 100;
}

private static void ThreadTwoStart() {
	Console.WriteLine(sharedState);
}


Code snippet taken from "Common Multithreading Mistakes in C# - III: Unsafe Assumptions".