Class Worker
A worker that constantly execute jobs in a background thread.
Implements
Inherited Members
Namespace: RageCoop.Core
Assembly: RageCoop.Core.dll
Syntax
public class Worker : IDisposable
Properties
IsBusy
Whether this worker is busy executing job(s).
Declaration
public bool IsBusy { get; }
Property Value
Type | Description |
---|---|
Boolean |
Name
Name of the worker
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
Dispose()
Finish current job and stop the worker.
Declaration
public void Dispose()
QueueJob(Action)
Queue a job to be executed
Declaration
public void QueueJob(Action work)
Parameters
Type | Name | Description |
---|---|---|
Action | work |
Stop()
Finish current job and stop the worker.
Declaration
public void Stop()