C# Class CSharpUtils.Threading.GreenThread

Inheritance: IDisposable
Datei anzeigen Open project: soywiz/csharputils Class Usage Examples

Public Properties

Property Type Description
GreenThreadLastId int
MonitorThread Thread

Protected Properties

Property Type Description
Action System.Action
CurrentThread Thread
Kill bool
ParentEvent System.Threading.ManualResetEvent
ParentThread Thread
ThisEvent System.Threading.ManualResetEvent
ThisGreenThreadList ThreadLocal

Public Methods

Method Description
Dispose ( ) : void
GreenThread ( ) : System
InitAndStartStopped ( System.Action Action ) : void
Stop ( ) : void
StopAll ( ) : void
SwitchTo ( ) : void

Called from the caller thread. This will give the control to the green thread.

ThisSemaphoreWaitOrParentThreadStopped ( ) : void
Yield ( ) : void

Called from the green thread. This will return the control to the caller thread.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

GreenThread() public method

public GreenThread ( ) : System
return System

InitAndStartStopped() public method

public InitAndStartStopped ( System.Action Action ) : void
Action System.Action
return void

Stop() public method

public Stop ( ) : void
return void

StopAll() public static method

public static StopAll ( ) : void
return void

SwitchTo() public method

Called from the caller thread. This will give the control to the green thread.
public SwitchTo ( ) : void
return void

ThisSemaphoreWaitOrParentThreadStopped() public method

public ThisSemaphoreWaitOrParentThreadStopped ( ) : void
return void

Yield() public static method

Called from the green thread. This will return the control to the caller thread.
public static Yield ( ) : void
return void

Property Details

Action protected_oe property

protected Action,System Action
return System.Action

CurrentThread protected_oe property

protected Thread CurrentThread
return Thread

GreenThreadLastId public_oe static_oe property

public static int GreenThreadLastId
return int

Kill protected_oe property

protected bool Kill
return bool

MonitorThread public_oe static_oe property

public static Thread MonitorThread
return Thread

ParentEvent protected_oe property

protected ManualResetEvent,System.Threading ParentEvent
return System.Threading.ManualResetEvent

ParentThread protected_oe property

protected Thread ParentThread
return Thread

ThisEvent protected_oe property

protected ManualResetEvent,System.Threading ThisEvent
return System.Threading.ManualResetEvent

ThisGreenThreadList protected_oe static_oe property

protected static ThreadLocal ThisGreenThreadList
return ThreadLocal