ManualResetEvent(Boolean) 构造函数

定义

使用布尔值初始化类的新实例 ManualResetEvent ,该值指示是否将初始状态设置为信号。

public:
 ManualResetEvent(bool initialState);
public ManualResetEvent(bool initialState);
new System.Threading.ManualResetEvent : bool -> System.Threading.ManualResetEvent
Public Sub New (initialState As Boolean)

参数

initialState
Boolean

true 设置已发出初始状态的信号; false 将初始状态设置为非对齐状态。

注解

如果信号发出了初始状态(即,如果通过传递该状态ManualResetEvent来创建),true则等待不阻止的initialStateManualResetEvent线程。 如果初始状态为非对齐状态,则线程会阻塞, Set 直到调用该方法。

适用于

另请参阅