mscorlib 2.0.0.0 4.0.0.0 System.Threading.WaitHandle System.Runtime.InteropServices.ComVisible(true)

The class allows threads to communicate with each other by signaling. Typically, one or more threads block on an until an unblocked thread calls the method, releasing one or more of the blocked threads. A thread can signal an and then block on it, by calling the static (Shared in Visual Basic) method.

The class provides access to named system synchronization events.

The behavior of an that has been signaled depends on its reset mode. An created with the flag resets automatically when signaled, after releasing a single waiting thread. An created with the flag remains signaled until its method is called.

Automatic reset events provide exclusive access to a resource. If an automatic reset event is signaled when no threads are waiting, it remains signaled until a thread attempts to wait on it. The event releases the thread and immediately resets, blocking subsequent threads.

Manual reset events are like gates. When the event is not signaled, threads that wait on it will block. When the event is signaled, all waiting threads are released, and the event remains signaled (that is, subsequent waits do not block) until its method is called. Manual reset events are useful when one thread must complete an activity before other threads can proceed.

objects can be used with the static (Shared in Visual Basic) and methods.

For more information about thread synchronization mechanisms, see EventWaitHandle, AutoResetEvent, and ManualResetEvent.

Represents a thread synchronization event.

- Constructor
  2.0.0.0
  4.0.0.0

  If the initial state of the event is nonsignaled, threads that wait on the event will block. If the initial state is signaled, and the flag is specified for , threads that wait on the event will not block. If the initial state is signaled, and is , the first thread that waits on the event will be released immediately, after which the event will reset, and subsequent threads will block.

  Initializes a new instance of the class, specifying whether the wait handle is initially signaled, and whether it resets automatically or manually.

  true to set the initial state to signaled; false to set it to nonsignaled.
  One of the values that determines whether the event resets automatically or manually.
- Constructor
  2.0.0.0
  4.0.0.0

  If is null or an empty string, a local is created.

  If a system event with the name specified for the parameter already exists, the parameter is ignored.

  When using this constructor for named system events, specify false for . This constructor provides no way to determine whether a named system event was created, so you cannot make any assumptions about the state of the named event. To determine whether a named event was created, use the constructor or the constructor.

  If the initial state of the event is nonsignaled, threads that wait on the event will block. If the initial state is signaled, and the flag is specified for , threads that wait on the event will not block. If the initial state is signaled, and is , the first thread that waits on the event will be released immediately, after which the event will reset, and subsequent threads will block.

  Initializes a new instance of the class, specifying whether the wait handle is initially signaled if created as a result of this call, whether it resets automatically or manually, and the name of a system synchronization event.

  true to set the initial state to signaled if the named event is created as a result of this call; false to set it to nonsignaled.
  One of the values that determines whether the event resets automatically or manually.
  The name of a system-wide synchronization event.
- Constructor
  2.0.0.0
  4.0.0.0
  To be added.
  To be added.
  To be added.
  To be added.
  To be added.
  To be added.
- Constructor
  2.0.0.0
  4.0.0.0
  To be added.
  To be added.
  To be added.
  To be added.
  To be added.
  To be added.
  To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Security.AccessControl.EventWaitHandleSecurity

  The method uses the following combination of flags (combined using the bitwise OR operation) to search for permissions: , , and .

  The user must have rights to call this method, and the event must have been opened with the flag.

  Gets an object that represents the access control security for the named system event represented by the current object.

  An object that represents the access control security for the named system event.

- Method
  2.0.0.0
  4.0.0.0
  System.Threading.EventWaitHandle ``

  The method tries to open the specified named system event. If the system event does not exist, this method throws an exception instead of creating the system event. To create the system event when it does not already exist, use one of the constructors that has a parameter.

  Multiple calls to this method that use the same value for do not necessarily return the same object, even though the objects that are returned represent the same named system event.

  This method overload is equivalent to calling the method overload and specifying and rights, combined by using the bitwise OR operation.

  Specifying the flag allows a thread to wait on the named system event, and specifying the flag allows a thread to call the and methods.

  Opens the specified named synchronization event, if it already exists.

  An object that represents the named system event.

  The name of the system synchronization event to open.
- Method
  2.0.0.0
  4.0.0.0
  System.Threading.EventWaitHandle `` ``

  The parameter must include the flag to allow threads to wait on the event, and the flag to allow threads to call the and methods.

  The method tries to open an existing named system event. If the system event does not exist, this method throws an exception instead of creating the system event. To create the system event when it does not already exist, use one of the constructors that has a parameter.

  Multiple calls to this method that use the same value for do not necessarily return the same object, even though the objects that are returned represent the same named system event.

  Opens the specified named synchronization event, if it already exists, with the desired security access.

  An object that represents the named system event.

  The name of the system synchronization event to open. A bitwise combination of the enumeration values that represent the desired security access.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  Sets the state of the event to nonsignaled, causing threads to block.

  true if the operation succeeds; otherwise, false.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean

  For an with (including ), the method releases a single thread. If there are no waiting threads, the wait handle remains signaled until a thread attempts to wait on it, or until its method is called.

  There is no guarantee that every call to the method will release a thread from an whose reset mode is . If two calls are too close together, so that the second call occurs before a thread has been released, only one thread is released. It is as if the second call did not happen. Also, if is called when there are no threads waiting and the is already signaled, the call has no effect.

  For an with (including ), calling the method leaves the wait handle in a signaled state until its method is called.

  Sets the state of the event to signaled, allowing one or more waiting threads to proceed.

  true if the operation succeeds; otherwise, false.

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The user must have rights to call this method, and the event must have been opened with the flag.

  Sets the access control security for a named system event.

  An object that represents the access control security to be applied to the named system event.
- Method
  4.0.0.0
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.