ManualResetEvent(Boolean) 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用布尔值初始化类的新实例 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 直到调用该方法。