C# Class refw.Dispatcher

This class models a basic cross-thread dispatcher as used in WinForms and WPF. One thread executes code through InvokeInvokes, while other threads queue up functions to be called in the main thread asynchronously with BeginInvoke or synchronously with Invoke.
Afficher le fichier Open project: fry/refw

Méthodes publiques

Méthode Description
BeginInvoke ( System.Action action ) : EventWaitHandle

Queue up a delegate without waiting for it to finish.

Invoke ( System.Action action ) : void

Queue up a delegate and return once it finishes

InvokeInvokes ( ) : void

Call all pending delegates and invoke their listening thread of their completion afterwards.

Method Details

BeginInvoke() public méthode

Queue up a delegate without waiting for it to finish.
public BeginInvoke ( System.Action action ) : EventWaitHandle
action System.Action delegate to be called by the owning thread
Résultat System.Threading.EventWaitHandle

Invoke() public méthode

Queue up a delegate and return once it finishes
public Invoke ( System.Action action ) : void
action System.Action delegate to be called by the owning thread
Résultat void

InvokeInvokes() public méthode

Call all pending delegates and invoke their listening thread of their completion afterwards.
public InvokeInvokes ( ) : void
Résultat void