Пример #1
0
        static void C2()
        {
            Consumer consumer2 = new Consumer("C2", 2, globalHeap, 1000, globalProductionFinished);

            consumer2.Run();
        }
Пример #2
0
        private static SharedBool globalProductionFinished; //shared bool to signal produciton finished



        static void C1()
        {
            Consumer consumer1 = new Consumer("C1", 1, globalHeap, 1000, globalProductionFinished);

            consumer1.Run();
        }