Düzenle

Aracılığıyla paylaş


DispatchSource.SetRegistrationHandler(Action) Method

Definition

Provides a registration handler

public void SetRegistrationHandler (Action handler);
member this.SetRegistrationHandler : Action -> unit

Parameters

handler
Action

Handler to invoke when the dispatch source has been registered and is ready to receive events.

Remarks

When Resume() is called on a suspended or newly created source, there may be a brief delay before the source is ready to receive events from the underlying system handle. During this delay, the event handler will not be invoked, and events will be missed.

Once the dispatch source is registered with the underlying system and is ready to process all events its optional registration handler will be submitted to its target queue. This registration handler may be specified via SetRegistrationHandler(Action)

The event handler will not be called until the registration handler finishes. If the source is canceled (see below) before it is registered, its registration handler will not be called.

Applies to