示例#1
0
        static void Main(string[] args)
        {
            int m = 10, M = 1000;

            ProducerConsumerSimulator pcSimulator = new ProducerConsumerSimulator(m, M);

            pcSimulator.sequentialOneProducerOneConsumer();
            pcSimulator.concurrentOneProducerOneConsumer();
            pcSimulator.concurrentMultiProducerMultiConsumer();

            Console.WriteLine("[END]");
        }
示例#2
0
文件: Program.cs 项目: traiv/Courses
        static void Main(string[] args)
        {
            int min = 10, max = 1000;

            ProducerConsumerSimulator pcSimulator = new ProducerConsumerSimulator(min, max);

            //todo 1: Uncomment the following statement and analyze the behaviour of the program.
            //pcSimulator.sequentialOneProducerOneConsumer();
            //todo 3: Uncomment the following statement and analyze the behaviour of the program.
            pcSimulator.concurrentOneProducerOneConsumer();
            //todo 5: Uncomment the following statement and analyze the behaviour of the program.
            //pcSimulator.concurrentMultiProducerMultiConsumer();

            Console.WriteLine("[END]");
        }