Skip to content

PowerPoolOption

ZjzMisaka edited this page Sep 16, 2024 · 8 revisions

Properties

The maximum number of threads that the thread pool can support.

int MaxThreads;

The option for destroying threads in the thread pool.

DestroyThreadOption DestroyThreadOption;

The total maximum amount of time that all works in the thread pool are permitted to run collectively before they are terminated.

TimeoutOption Timeout;

The default maximum amount of time a work in the pool is allowed to run before it is terminated.

TimeoutOption DefaultWorkTimeout;

After setting, it will be triggered regularly when the pool is in the running state.

RunningTimerOption RunningTimerOption;

The default callback function that is called when a work finishes execution.

Action<ExecuteResult<object>> DefaultCallback;

Indicates whether the pool should begin in a suspended state.

bool StartSuspended;

FIFO or LIFO.

QueueType QueueType;

Determines whether to clear the result storage when the pool starts.

bool ClearResultStorageWhenPoolStart;

Determines whether to clear the records of failed work when the pool starts.

bool ClearFailedWorkRecordWhenPoolStart;

A factory function that creates instances of IStealablePriorityCollection<T> of type string.

Func<IStealablePriorityCollection<string>> CustomQueueFactory;

Enums

enum QueueType { FIFO, LIFO };