C# Class EpLibrary.cs.BaseWorkerThread

A class that implements Base Worker Thread Class.
Inheritance: ThreadEx
Afficher le fichier Open project: juhgiyo/EpLibrary.cs Class Usage Examples

Protected Properties

Свойство Type Description
m_callBackFunc Action
m_callBackLock Object
m_jobProcessor EpLibrary.cs.BaseJobProcessor
m_lifePolicy ThreadLifePolicy
m_workPool JobScheduleQueue

Méthodes publiques

Méthode Description
BaseWorkerThread ( BaseWorkerThread b ) : System

Default copy constructor

BaseWorkerThread ( ThreadLifePolicy policy ) : System

Default Constructor

Erase ( BaseJob work ) : bool

Erase the given work from the work pool.

Front ( ) : BaseJob

Get First Job in the Job Queue.

GetJobCount ( ) : int

Get job count in work pool.

GetJobProcessor ( ) : EpLibrary.cs.BaseJobProcessor

Get Job Processor.

GetLifePolicy ( ) : ThreadLifePolicy

Return the life policy of this worker thread.

Pop ( ) : BaseJob

Pop a work from the work pool.

Push ( BaseJob work ) : void

Push in the new work to the work pool.

SetCallBackClass ( Action callBackFunc ) : void

Set call back class to call when work is done.

SetJobProcessor ( EpLibrary.cs.BaseJobProcessor jobProcessor ) : void

Set new Job Processor.

TerminateWorker ( int waitTimeInMilliSec = Timeout.Infinite ) : TerminateResult

Wait for worker thread to terminate, and if not terminated, then Terminate.

Méthodes protégées

Méthode Description
callCallBack ( ) : void

Call the Call Back Class if callback class is assigned.

execute ( ) : void

Pure Worker Thread Code.

Method Details

BaseWorkerThread() public méthode

Default copy constructor
public BaseWorkerThread ( BaseWorkerThread b ) : System
b BaseWorkerThread the object to copy from
Résultat System

BaseWorkerThread() public méthode

Default Constructor
public BaseWorkerThread ( ThreadLifePolicy policy ) : System
policy ThreadLifePolicy the life policy of this worker thread.
Résultat System

Erase() public méthode

Erase the given work from the work pool.
public Erase ( BaseJob work ) : bool
work BaseJob the work to erase from the work pool
Résultat bool

Front() public méthode

Get First Job in the Job Queue.
public Front ( ) : BaseJob
Résultat BaseJob

GetJobCount() public méthode

Get job count in work pool.
public GetJobCount ( ) : int
Résultat int

GetJobProcessor() public méthode

Get Job Processor.
public GetJobProcessor ( ) : EpLibrary.cs.BaseJobProcessor
Résultat EpLibrary.cs.BaseJobProcessor

GetLifePolicy() public méthode

Return the life policy of this worker thread.
public GetLifePolicy ( ) : ThreadLifePolicy
Résultat ThreadLifePolicy

Pop() public méthode

Pop a work from the work pool.
public Pop ( ) : BaseJob
Résultat BaseJob

Push() public méthode

Push in the new work to the work pool.
public Push ( BaseJob work ) : void
work BaseJob the new work to put into the work pool.
Résultat void

SetCallBackClass() public méthode

Set call back class to call when work is done.
public SetCallBackClass ( Action callBackFunc ) : void
callBackFunc Action the call back function.
Résultat void

SetJobProcessor() public méthode

Set new Job Processor.
public SetJobProcessor ( EpLibrary.cs.BaseJobProcessor jobProcessor ) : void
jobProcessor EpLibrary.cs.BaseJobProcessor set new Job Processor for this thread.
Résultat void

TerminateWorker() public méthode

Wait for worker thread to terminate, and if not terminated, then Terminate.
public TerminateWorker ( int waitTimeInMilliSec = Timeout.Infinite ) : TerminateResult
waitTimeInMilliSec int the time-out interval, in milliseconds.
Résultat TerminateResult

callCallBack() protected méthode

Call the Call Back Class if callback class is assigned.
protected callCallBack ( ) : void
Résultat void

execute() protected abstract méthode

Pure Worker Thread Code.
protected abstract execute ( ) : void
Résultat void

Property Details

m_callBackFunc protected_oe property

the call back class
protected Action m_callBackFunc
Résultat Action

m_callBackLock protected_oe property

callback Lock
protected Object m_callBackLock
Résultat Object

m_jobProcessor protected_oe property

Job Processor
protected BaseJobProcessor,EpLibrary.cs m_jobProcessor
Résultat EpLibrary.cs.BaseJobProcessor

m_lifePolicy protected_oe property

the life policy of the thread
protected ThreadLifePolicy m_lifePolicy
Résultat ThreadLifePolicy

m_workPool protected_oe property

the work list
protected JobScheduleQueue m_workPool
Résultat JobScheduleQueue