static void Watcher() { while (true) { Debug.Assert(SmallMatrix.SameValueEverywhere(s_smallMatrix)); } }
static void Main(string[] args) { (new Thread(Watcher)).Start(); while (true) { s_smallMatrix = new SmallMatrix(0); s_smallMatrix = new SmallMatrix(1); } }
public static bool SameValueEverywhere(SmallMatrix m) { return((m.m_a == m.m_b) && (m.m_a == m.m_c) && (m.m_a == m.m_d)); }