在MSDN上有两段话不大理解?
1.If the return value is 1, the specified thread was suspended but was restarted. 
什么时restarted?挂起还能重新开始?这不是矛盾吗?2.By suspending all threads in a process except for the one reporting a debug event, it is possible to "single step" a single thread. The other threads are not released by a continue operation if they are suspended. 
这段话就完全看不懂了!只知道是调试时会挂起进程内的所有线程,但是不知道“EXCEPT”那种情况到底是什么?

解决方案 »

  1.   

    第一句:
    resumethread查看并返回该线程当前的suspend count并把该值递减1,也就是说如果返回值是1的话,(被悬挂的)线程解除悬挂状态并重新开始
      

  2.   


    什么时重新开始啊?
    是从线程函数的第一条语句重新开始执行吗?如果是这样的话,那挂起前线程所做的工作不就全部丢失了吗?
    而且既然只是解除悬挂状态,并没有获得CPU执行权,怎么重新开始啊?这不是矛盾吗?
      

  3.   

    不是重线程函数的第一行开始,从你上次暂停的地方开始。
    恢复线程后系统知道该线程能够被调用,那么根据这个线程的优先级可以给予cpu时间片
    还不明白可以去查阅 advanced windows第7章