首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 软件时空 > 软件相关 > C#线程问题Threading.Thread
【标  题】:C#线程问题Threading.Thread
【关键字】:C#,Threading.Thread
【来  源】:http://blog.csdn.net/a450987/archive/2007/04/19/1570403.aspx

C#线程问题Threading.Thread

C#线程问题
 
/// <summary>
        /// 开始
        /// </summary>
        public void Start()
        {
            if (!IsSleep)
            {
                for (int i = 0; i < threadNum; i++)
                {
                    updateThread.Start();
                }
            }
            else
            {
                for (int i = 0; i < threadNum; i++)
                {
                    if (updateThread.IsAlive)
                        updateThread.Resume();
                }
            }

        }
        /// <summary>
        /// 停止
        /// </summary>
        public void Stop()
        {
            for (int i = 0; i < threadNum; i++)
            {
                if (updateThread.IsAlive)
                    updateThread.Suspend();
            }
            IsSleep = true;

警告 1 “System.Threading.Thread.Resume()”已过时:“Thread.Resume has been deprecated.  Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.  http://go.microsoft.com/fwlink/?linkid=14202
警告 2 “System.Threading.Thread.Suspend()”已过时:“Thread.Suspend has been deprecated.  Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.  http://go.microsoft.com/fwlink/?linkid=14202

谁知道System.Threading.Thread.Resume,System.Threading.Thread.Suspend在VS2005中用什么方法代替啊
 
咨询入门教程之四--咨询顾问方法-“头脑风暴”:【上一篇】
为什么程序员总加班?:【下一篇】
【相关文章】
  • ASP.NET(用c#),弹出文件保存对话框窗口
  • C#方法和属性重写几点说明
  • 关于.NET(C#)中字符型(Char)与数字类型的转换, CLR via c# 读书笔记
  • 用c#和和.net创建Infopath中的自定义控件
  • C#运用存储过程1
  • .net 自用代码大全天天收藏(C#版)
  • C#使用AD数据库中的人员信息
  • C#中程序控制输入法的另一种思路
  • (C#)Windows Shell 编程系列4 - 上下文菜单(iContextMenu)(二)嵌入菜单和执行命令
  • 我看《Effective C#》之--为什么要使用属性?
  • 【随机文章】
  • IPV6 中6所指何物
  • 图片浏览大师:ACDSee技巧指南
  • 红酒
  • Tomcat 5.5 的 Apache Tomcat Native library
  • 记录ISA Server活动(4)
  • 从一个舆论调查的制作谈面向对象的编程思路(五)
  • 正确选用和使用轮胎
  • AD排错工具
  • 看我如何用QQ把生活安排得有条不紊
  • Windows文件保护:如何斩断它飞翔的翅膀 下
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.