/// <summary> /// Initializes the barrier /// </summary> /// <param name="n">Number of threads to gather at the barrier</param> public Barrier(int n) { numSynchronizedThreads = count = n; monitor = new MonitorEx(); }