Show / Hide Table of Contents

Class MTJobQueue

Multi-threaded job queue. A job queue allows a fixed number of jobs to be executed in parallel, typically one per CPU core. If the number of jobs exceeds the maximum parallelism, the jobs are queued until a slot becomes available. This class is at the core of TuringTrader's optimizer, but also used for parallel data updating.

Inheritance
object
MTJobQueue
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TuringTrader.Simulator
Assembly: TuringTrader.Simulator.dll
Syntax
public class MTJobQueue

Constructors

| Improve this Doc View Source

MTJobQueue(int)

Create and initialize new job queue.

Declaration
public MTJobQueue(int maxNumberOfThreads = 0)
Parameters
Type Name Description
int maxNumberOfThreads

maximum number of threads. If zero, the number of logical cpu cores is used.

Properties

| Improve this Doc View Source

STA

Set child threads to STA. This may be required for threads interacting w/ GUI elements.

Declaration
public bool STA { get; set; }
Property Value
Type Description
bool

Methods

| Improve this Doc View Source

QueueJob(Action)

Add job to queue.

Declaration
public void QueueJob(Action job)
Parameters
Type Name Description
System.Action job

job action

| Improve this Doc View Source

WaitForCompletion()

Wait for completion of all currently queued jobs.

Declaration
public void WaitForCompletion()
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2011-2023, Bertram Enterprises LLC dba TuringTrader.com