ProcessThread.WaitReason 属性

定义

获取线程等待的原因。

public:
 property System::Diagnostics::ThreadWaitReason WaitReason { System::Diagnostics::ThreadWaitReason get(); };
public System.Diagnostics.ThreadWaitReason WaitReason { get; }
member this.WaitReason : System.Diagnostics.ThreadWaitReason
Public ReadOnly Property WaitReason As ThreadWaitReason

属性值

一个 ThreadWaitReason,表示线程处于等待状态的原因。

例外

线程不在等待状态。

进程在远程计算机上。

注解

WaitReason当 为 Wait时, ThreadState 属性才有效。 因此,在获取 WaitReason 属性之前,ThreadState检查值。

适用于

另请参阅