void ForceContention() { Thread t = new Thread(new ThreadStart(Contention)); t.Start(); Contention(); }
public static void Main() { StaticLocks a = new StaticLocks(); a.RunTest(); a.RunTest(); a.RunTest(); Console.WriteLine("Forcing contention"); a.ForceContention(); Console.WriteLine("Contention forced"); a.RunTest(); a.RunTest(); a.RunTest(); }