C# Class Twingly.Gearman.GearmanThreadedWorker

Inheritance: GearmanWorker
Mostrar archivo Open project: twingly/GearmanSharp Class Usage Examples

Protected Properties

Property Type Description
ContinueWorking bool

Public Methods

Method Description
GearmanThreadedWorker ( ) : System
GearmanThreadedWorker ( ClusterConfigurationElement clusterConfiguration ) : System
GearmanThreadedWorker ( string clusterName ) : System
JoinWorkerThread ( ) : void

Joins the worker thread, if it's alive.

SignalWorkerThreadToStop ( ) : void

Tells the worker thread to stop and then joins the thread.

StartWorkLoop ( ) : void
StopWorkLoop ( ) : void

Tells the worker thread to stop and then joins the thread.

Protected Methods

Method Description
OnJobException ( Exception exception, GearmanJobInfo jobAssignment ) : bool

Called when a job function throws an exception. Does nothing and returns false, to not abort the work loop.

Private Methods

Method Description
WorkLoopThreadProc ( ) : void

Method Details

GearmanThreadedWorker() public method

public GearmanThreadedWorker ( ) : System
return System

GearmanThreadedWorker() public method

public GearmanThreadedWorker ( ClusterConfigurationElement clusterConfiguration ) : System
clusterConfiguration Twingly.Gearman.Configuration.ClusterConfigurationElement
return System

GearmanThreadedWorker() public method

public GearmanThreadedWorker ( string clusterName ) : System
clusterName string
return System

JoinWorkerThread() public method

Joins the worker thread, if it's alive.
public JoinWorkerThread ( ) : void
return void

OnJobException() protected method

Called when a job function throws an exception. Does nothing and returns false, to not abort the work loop.
protected OnJobException ( Exception exception, GearmanJobInfo jobAssignment ) : bool
exception System.Exception The exception thrown by the job function.
jobAssignment GearmanJobInfo The job assignment that the job function got.
return bool

SignalWorkerThreadToStop() public method

Tells the worker thread to stop and then joins the thread.
public SignalWorkerThreadToStop ( ) : void
return void

StartWorkLoop() public method

public StartWorkLoop ( ) : void
return void

StopWorkLoop() public method

Tells the worker thread to stop and then joins the thread.
public StopWorkLoop ( ) : void
return void

Property Details

ContinueWorking protected_oe property

protected bool ContinueWorking
return bool