Table of Contents

Class CpuThreadPoolOptions

Namespace
DotCompute.Backends.CPU.Threading
Assembly
DotCompute.Backends.CPU.dll

Configuration options for the CPU thread pool.

public sealed class CpuThreadPoolOptions
Inheritance
CpuThreadPoolOptions
Inherited Members

Properties

EnableWorkStealing

Gets or sets whether to use work stealing for load balancing.

public bool EnableWorkStealing { get; set; }

Property Value

bool

MaxQueuedItems

Gets or sets the maximum number of queued work items.

public int MaxQueuedItems { get; set; }

Property Value

int

MaxStealAttempts

Gets or sets the maximum number of steal attempts per thread.

public int MaxStealAttempts { get; set; }

Property Value

int

ThreadPriority

Gets or sets the thread priority for worker threads.

public ThreadPriority ThreadPriority { get; set; }

Property Value

ThreadPriority

UseThreadAffinity

Gets or sets whether to use thread affinity for better cache locality.

public bool UseThreadAffinity { get; set; }

Property Value

bool

WorkStealingBackoffMs

Gets or sets the work stealing back-off delay in milliseconds.

public int WorkStealingBackoffMs { get; set; }

Property Value

int

WorkerThreads

Gets or sets the number of worker threads. If null, defaults to Environment.ProcessorCount.

public int? WorkerThreads { get; set; }

Property Value

int?