예제 #1
0
        static void Main(string[] args)
        {
            TaskTools.InvokeAsyncException();
            //TaskTools.ManualResetEventTh();
            dynamic a = 1;

            //TaskTools.TaskStartNew();
            //TaskTools.CreateTask();
            //ThreadPool.QueueUserWorkItem(dosth, 5);
            //Console.WriteLine("主线程运行至此!");
            //dosth(45);
            Console.ReadKey();
        }
예제 #2
0
        public static async void dosth(object param)
        {
            int result = await TaskTools.GetSum(100000);

            Console.WriteLine(result);
        }