コード例 #1
0
            public Consumer()
            {
                Console.WriteLine("new consumer added!");
                Thread consumer = new Thread(consUse);

                ThreadLists.Add(consumer);
                consumer.Start();
            }
コード例 #2
0
            public Producer()
            {
                res = new Resource();
                resourcesArr.Add(res);
                Thread producer = new Thread(proIncrease);

                ThreadLists.Add(producer);
                producer.Start();
            }