生命周期

  • Start
  • Suspend 暂停
  • Resume 恢复
  • Interrupt 中断 抛出异常
  • Abort 销毁线程
  • Join 调用处等待线程执行完毕

ThreadState 

  • Running = 0,
  • StopRequested = 1,
  • SuspendRequested = 2,
  • Background = 4,
  • Unstarted = 8,
  • Stopped = 0x10,
  • WaitSleepJoin = 0x20,  
    The thread is blocked. This could be the result of calling Sleep(Int32) or Join(), of requesting a lock - for example, by calling Enter(Object) or Wait(Object, Int32, Boolean) - or of waiting on a thread synchronization object such as ManualResetEvent.
  • Suspended = 0x40,
  • AbortRequested = 0x80,
  • Aborted = 0x100
posted @ 2019-08-18 19:27  vvf  阅读(126)  评论(0编辑  收藏  举报