Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            _atomicityExample = new AtomicityExample();

            var t1 = new Thread(Writer);
            var t2 = new Thread(Reader);

            t1.Start();
            t2.Start();

            t1.Join();
            t2.Join();

            foreach (var k in D.Keys)
            {
                Console.WriteLine(k);
            }

            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            _atomicityExample = new AtomicityExample();

            var t1 = new Thread(Writer);
            var t2 = new Thread(Reader);

            t1.Start();
            t2.Start();

            t1.Join();
            t2.Join();

            foreach (var k in D.Keys)
            {
                Console.WriteLine(k);
            }

            Console.ReadKey();
        }