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

            Console.WriteLine("Main terminates");
        }
Example #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()");
        }
Example #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()");
        }