예제 #1
0
        static async Task Main(string[] args)
        {
            ThreadingTest demo = new ThreadingTest();
            await demo.Run();

            Console.WriteLine("Main terminates");
        }
예제 #2
0
        static void Main(string[] args)
        {
            ThreadingTest demo = new ThreadingTest();

            Console.WriteLine("Before running my foo()");
            demo.Run();
            Console.WriteLine("After running my foo()");
        }
예제 #3
0
        static void Main(string[] args)
        {
            ThreadingTest demo = new ThreadingTest();

            Console.WriteLine("Before running my foo()");
            demo.Run();
            // synchronous sleep
            // System.Threading.Thread.Sleep(6000);
            Console.WriteLine("After running my foo()");
        }