标题:求助(线程问题)
取消只看楼主
木蕊
Rank: 2
等 级:论坛游民
帖 子:32
专家分:26
注 册:2013-6-22
结帖率:100%
已结贴  问题点数:20 回复次数:0 
求助(线程问题)
static void Main(string[] args)
        {   
            Thread t1 = new Thread(new ThreadStart(threadfunction));
            Thread t2 = new Thread(new ThreadStart(fun));
             t1.Priority = ThreadPriority.Highest;//为什么结果是:线程2 线程1?t1的优先级不是比t2高吗?
            t2.Start();
            t1.Start();
           

        }

        public static  void threadfunction()
        {
            Console.WriteLine("线程1");
        }
        public static void fun()
        {
            Console.WriteLine("线程2");
        }
搜索更多相关主题的帖子: public 优先级 
2013-06-26 19:15



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-416121-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.048012 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved