SignalNotifier class

Applies to Windows and Windows Phone

Runs a method when an event or semaphore is signaled. A timeout value can also be specified, causing the delegate to run after the time span has elapsed if the named event does not occur (or if the semaphore does not reach a signaled state).

Note  The ThreadPool API is supported for desktop as well as Windows Store apps.

Syntax


public sealed class SignalNotifier

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The SignalNotifier class has these types of members:

Methods

The SignalNotifier class has these methods. It also inherits methods from the Object class.

MethodDescription
AttachToEvent(String, SignalHandler) Attaches a SignalHandler delegate to an event. The delegated method will run the next time the event occurs.
AttachToEvent(String, SignalHandler, TimeSpan) Attaches a SignalHandler delegate to an event. The delegated method will run if the event occurs or the time span elapses, whichever comes first.
AttachToSemaphore(String, SignalHandler) Attaches a SignalHandler delegate to a named semaphore. The delegated method will run when the named semaphore is signaled.
AttachToSemaphore(String, SignalHandler, TimeSpan) Attaches a SignalHandler delegate to a named semaphore and specifies a timeout value. The delegated method will run when the named semaphore is signaled, or if the time span elapses before the semaphore reaches a signaled state.
Enable Submits the SignalNotifier to the thread pool.
Terminate Terminates the SignalNotifier if it has not already started running.

 

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.System.Threading.Core
Windows::System::Threading::Core [C++]

Metadata

Windows.winmd

See also

Object

 

 

Show:
© 2014 Microsoft