Editar

Partilhar via


ManualResetEvent(Boolean) Constructor

Definition

Initializes a new instance of the ManualResetEvent class with a Boolean value indicating whether to set the initial state to signaled.

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

Parameters

initialState
Boolean

true to set the initial state signaled; false to set the initial state to nonsignaled.

Remarks

If the initial state of a ManualResetEvent is signaled (that is, if it is created by passing true for initialState), threads that wait on the ManualResetEvent do not block. If the initial state is nonsignaled, threads block until the Set method is called.

Applies to

See also