namespace ConsoleApplication1
{
    class Program
    {
        static Task ones;
        static void Main(string[] args)
        {
            ones = new Task(one);
            ones.Start();
            Console.ReadKey();
        }
        static void one()
        {
            Console.WriteLine("任务ID: {0}",Task.CurrentId);
            var twos = new Task(two);
            twos.Start();
            Console.WriteLine("任务一启动");
            Thread.Sleep(2000);
        }
        static void two()
        {
            Console.WriteLine("任务二启动");
            Thread.Sleep(2000);
            ones= new Task(one);
            ones.Start();
        }
    }
}