C# Class RemoteViewing.Utility.PollingSynchronizationContext

A synchronization context that can be used if you want to handle events by polling.
Inheritance: System.Threading.SynchronizationContext
Afficher le fichier Open project: qmfrederik/remoteviewing

Méthodes publiques

Méthode Description
CheckEvents ( int timeout ) : bool

Dequeues and runs an action, if one is queued.

Post ( SendOrPostCallback d, object state ) : void

Posts an action to run when PollingSynchronizationContext.CheckEvents is called. This will not block.

Send ( SendOrPostCallback d, object state ) : void

Sends an action to run when PollingSynchronizationContext.CheckEvents is called. This will block until then. This will lock up if you call it from the same thread you use for checking events.

Private Methods

Méthode Description
Post ( System.Action action ) : void

Post an action to run when PollingSynchronizationContext.CheckEvents is called. This will not block.

Method Details

CheckEvents() public méthode

Dequeues and runs an action, if one is queued.
public CheckEvents ( int timeout ) : bool
timeout int The number of milliseconds to wait for an action to run.
Résultat bool

Post() public méthode

Posts an action to run when PollingSynchronizationContext.CheckEvents is called. This will not block.
public Post ( SendOrPostCallback d, object state ) : void
d SendOrPostCallback The callback.
state object State to pass to the callback.
Résultat void

Send() public méthode

Sends an action to run when PollingSynchronizationContext.CheckEvents is called. This will block until then. This will lock up if you call it from the same thread you use for checking events.
public Send ( SendOrPostCallback d, object state ) : void
d SendOrPostCallback The callback.
state object State to pass to the callback.
Résultat void