判断线程是否运行的方法:

thread.ThreadState == ThreadState.Running

有时候会出现多个命名空间中同时含有ThreadState建议使用下面方法;

printThread.ThreadState == System.Threading.ThreadState.Running

线程的状态列表

C#中线程所处的状态

相关文章:

  • 2021-11-06
  • 2022-12-23
  • 2021-08-07
  • 2021-04-13
  • 2021-12-18
  • 2022-03-02
  • 2021-06-30
  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案