zoukankan      html  css  js  c++  java
  • AsyncAwait 学习

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    
    namespace AsyncAndAwaitLearn
    {
        class Program
        {
            static void Main(string[] args)
            {
                //创建线程 开启线程
                new Thread(Test1).Start();// .NET 1.0开始就有的
    
                Task.Factory.StartNew(Test1); // .NET 4.0 引入了 TPL
    
                Task.Run(new Action(Test1)); // .NET 4.5 新增了一个Run的方法
    
            }
    
            public static void Test1()
            {
                Console.WriteLine("哈哈,我其实是另一个线程");
            }
        }
    }
    

      

  • 相关阅读:
    C++中类模板的概念和意义
    欢迎访问新博客aiyoupass.com
    P2327
    P2885
    P1968
    Link-Cut-Tree
    树的重心
    点分治笔记
    SPOJ 375
    树链剖分
  • 原文地址:https://www.cnblogs.com/Jeely/p/11001720.html
Copyright © 2011-2022 走看看