Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
类 Thread 有一个很好的状态WaitSleepJoin
有什么方法可以让我在使用 Task 类时确定该状态?
请注意,任务与线程没有直接关联。一个任务在其生命周期中可能会使用多个线程。话虽如此,您可以使用Status属性检查任务的状态。