Lean
$LEAN_TAG$
|
This worker tread is required to guarantee all python operations are executed by the same thread, to enable complete debugging functionality. We don't use the main thread, to avoid any chance of blocking the process More...
Public Member Functions | |
void | Add (Action action) |
Adds a new item of work More... | |
void | Dispose () |
Disposes the worker thread. More... | |
Static Public Attributes | |
static WorkerThread | Instance = new WorkerThread() |
The worker thread instance More... | |
Protected Member Functions | |
WorkerThread () | |
Creates a new instance, which internally launches a new worker thread More... | |
Properties | |
AutoResetEvent | FinishedWorkItem [get] |
Will be set when the worker thread finishes a work item More... | |
This worker tread is required to guarantee all python operations are executed by the same thread, to enable complete debugging functionality. We don't use the main thread, to avoid any chance of blocking the process
Definition at line 28 of file WorkerThread.cs.
|
protected |
Creates a new instance, which internally launches a new worker thread
Definition at line 48 of file WorkerThread.cs.
void QuantConnect.Util.WorkerThread.Add | ( | Action | action | ) |
Adds a new item of work
action | The work item to add |
Definition at line 88 of file WorkerThread.cs.
void QuantConnect.Util.WorkerThread.Dispose | ( | ) |
Disposes the worker thread.
Note that the worker thread is a background thread, so it won't block the process from terminating even if not disposed
Definition at line 98 of file WorkerThread.cs.
|
static |
The worker thread instance
Definition at line 37 of file WorkerThread.cs.
|
get |
Will be set when the worker thread finishes a work item
Definition at line 42 of file WorkerThread.cs.