zoukankan      html  css  js  c++  java
  • .net多线程,线程异步,线程同步,并发问题---1---ShinePans

    申请线程,输出线程状态:


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    
    namespace 主线程1
    {
        class Program
        {
            static void Main(string[] args)
            {
                Console.WriteLine("当前的线程状况:");
                //声明线程变量并赋值为当前线程
                Thread primaryThread = Thread.CurrentThread;
                //赋值线程的名称
                primaryThread.Name = "主线程";
                //显示进程的相关信息
                Console.WriteLine("线程的名字:{0}", primaryThread.Name);
                Console.WriteLine("线程启动状况:{0}", primaryThread.IsAlive);
                Console.WriteLine("线程优先级:{0}", primaryThread.Priority);
                Console.WriteLine("线程状态:{0}", primaryThread.ThreadState);
                Console.ReadLine();
            }
        }
    }
    






  • 相关阅读:
    Win10系统下安装Tensorflow
    基于theano的深度卷积神经网络
    卷积层和池化层
    ReLu(Rectified Linear Units)激活函数
    向上取整&向下取整
    物品选取
    猫狗大战
    田忌赛马
    魔术棋子
    回文字串
  • 原文地址:https://www.cnblogs.com/blfbuaa/p/6699156.html
Copyright © 2011-2022 走看看