コード例 #1
0
        public void Run()
        {
            var receiverThread = new Thread(() => receiver.Start());

            receiverThread.Start();

            var processorThread = new Thread(() => processor.Start());

            processorThread.Start();

            for (var i = 0; i < 3; ++i)
            {
                Console.WriteLine("Starting listener: {0}", i);

                var listener       = new ListenerService(i);
                var listenerThread = new Thread(listener.Start);
                listenerThread.Start();
            }
        }