C#线程问题Threading.Thread

a450987 2007-04-19 01:32:02
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中用什么方法代替啊
...全文
607 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
spiderleon 2007-04-25
  • 打赏
  • 举报
回复
这...怎么不去C#版去发...

1,265

社区成员

发帖
与我相关
我的任务
社区描述
软件工程/管理 管理版
社区管理员
  • 研发管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧