Example #1
0
        static void Main(string[] args)
        {
            Object lockObject = new Object();
            for (int i = 0; i < Console.WindowWidth; i++)
            {
                ChainDisplayer cd = new ChainDisplayer(lockObject, i);
                Thread thread = new Thread(_ => cd.Display());
                thread.Start();
            }

            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            Object lockObject = new Object();

            for (int i = 0; i < Console.WindowWidth; i++)
            {
                ChainDisplayer cd     = new ChainDisplayer(lockObject, i);
                Thread         thread = new Thread(_ => cd.Display());
                thread.Start();
            }

            Console.ReadKey();
        }