コード例 #1
0
        public static void Run()
        {
            var app = new ThreadCallback();
            var api = new Api(app.UpdateList);

            var post1 = new System.Threading.Thread(api.Post);
            var post2 = new System.Threading.Thread(api.Post);
            var post3 = new System.Threading.Thread(api.Post);

            post1.Start("Subscriber #1");
            post2.Start("Subscriber #2");
            post3.Start("Subscriber #3");
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Work.Run();
            ThreadStart.Run();
            ParameterizedThreadStart.Run();
            ThreadCallback.Run();
            Join.Run();
            Concurrency.Run();
            Lock.Run();
            DeadLock.Run();

            Console.WriteLine("Processor Count: {0}", Environment.ProcessorCount);
        }