C# Class System.Threading.SingleThreadedInvoker

An invoker which runs invoked delegates on a message queue processed by a single thread.
Inheritance: System.SafeDisposable, ISynchronizeInvoke
显示文件 Open project: madelson/Emotiv-Experimenter Class Usage Examples

Public Methods

Method Description
BeginInvoke ( Delegate method, object args ) : IAsyncResult

Queue the delegate to be invoked on this invoker's thread

EndInvoke ( IAsyncResult result ) : object

Returns when the asynchronous invokation represented by result completes

Invoke ( Delegate method, object args ) : object

Invokes the delegate on this invoker's thread and returns upon completion

SingleThreadedInvoker ( ) : System

Construct an invoker with its own background thread

Protected Methods

Method Description
DisposeOfManagedResources ( ) : void

Stops the message loop

Private Methods

Method Description
DisposeOfMRE ( ManualResetEvent mre ) : void
EventLoop ( ) : void
GetMRE ( ) : ManualResetEvent

Method Details

BeginInvoke() public method

Queue the delegate to be invoked on this invoker's thread
public BeginInvoke ( Delegate method, object args ) : IAsyncResult
method System.Delegate
args object
return IAsyncResult

DisposeOfManagedResources() protected method

Stops the message loop
protected DisposeOfManagedResources ( ) : void
return void

EndInvoke() public method

Returns when the asynchronous invokation represented by result completes
public EndInvoke ( IAsyncResult result ) : object
result IAsyncResult
return object

Invoke() public method

Invokes the delegate on this invoker's thread and returns upon completion
public Invoke ( Delegate method, object args ) : object
method System.Delegate
args object
return object

SingleThreadedInvoker() public method

Construct an invoker with its own background thread
public SingleThreadedInvoker ( ) : System
return System