Share via


SignalNotifier.AttachToSemaphore Method

Definition

Overloads

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.

AttachToSemaphore(String, SignalHandler)

Attaches a SignalHandler delegate to a named semaphore. The delegated method will run when the named semaphore is signaled.

public:
 static SignalNotifier ^ AttachToSemaphore(Platform::String ^ name, SignalHandler ^ handler);
/// [Windows.Foundation.Metadata.Overload("AttachToSemaphore")]
 static SignalNotifier AttachToSemaphore(winrt::hstring const& name, SignalHandler const& handler);
[Windows.Foundation.Metadata.Overload("AttachToSemaphore")]
public static SignalNotifier AttachToSemaphore(string name, SignalHandler handler);
function attachToSemaphore(name, handler)
Public Shared Function AttachToSemaphore (name As String, handler As SignalHandler) As SignalNotifier

Parameters

name
String

Platform::String

winrt::hstring

Names the semaphore that signals the method to run.

handler
SignalHandler

Indicates the delegate that will run in response to the named semaphore entering the signaled state.

Returns

The resulting SignalNotifier object.

Attributes

See also

Applies to

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.

public:
 static SignalNotifier ^ AttachToSemaphore(Platform::String ^ name, SignalHandler ^ handler, TimeSpan timeout);
/// [Windows.Foundation.Metadata.Overload("AttachToSemaphoreWithTimeout")]
 static SignalNotifier AttachToSemaphore(winrt::hstring const& name, SignalHandler const& handler, TimeSpan const& timeout);
[Windows.Foundation.Metadata.Overload("AttachToSemaphoreWithTimeout")]
public static SignalNotifier AttachToSemaphore(string name, SignalHandler handler, System.TimeSpan timeout);
function attachToSemaphore(name, handler, timeout)
Public Shared Function AttachToSemaphore (name As String, handler As SignalHandler, timeout As TimeSpan) As SignalNotifier

Parameters

name
String

Platform::String

winrt::hstring

Names the semaphore that signals the method to run.

handler
SignalHandler

Indicates the delegate that will run in response to the named semaphore entering the signaled state.

timeout
TimeSpan TimeSpan

Indicates the amount of time to continue waiting for the named semaphore before running the delegate.

Returns

The resulting SignalNotifier object.

Attributes

See also

Applies to