CancellationToken.WaitHandle 属性

定义

获取在取消标记时收到信号的 WaitHandle

public:
 property System::Threading::WaitHandle ^ WaitHandle { System::Threading::WaitHandle ^ get(); };
public System.Threading.WaitHandle WaitHandle { get; }
member this.WaitHandle : System.Threading.WaitHandle
Public ReadOnly Property WaitHandle As WaitHandle

属性值

在取消标记时收到信号的 WaitHandle

例外

注解

访问此属性会导致 WaitHandle 实例化 。 最好仅在必要时使用此属性,然后尽早释放关联的 CancellationTokenSource 实例, (释放源将释放此分配的句柄) 。 不应直接关闭或释放句柄。

适用于

另请参阅