PowerPoolOption - ZjzMisaka/PowerThreadPool GitHub Wiki
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;
The type of work ID to be used.
WorkIDType WorkIDType;
Reject policy.
RejectOption RejectOption;
enum QueueType { FIFO, LIFO };
enum WorkIDType { LongIncrement, Guid };