WorkOption - ZjzMisaka/PowerThreadPool.zh-CN.Wiki GitHub Wiki

属性

自定义的任务ID.如果设为null, 线程池将使用Guid作为任务ID.

string CustomWorkID;

任务的组名.

string Group;

任务允许运行的最长时间, 超过此时间将被终止.

TimeoutOption Timeout;

任务完成执行时调用的回调函数.

Action<ExecuteResult<TResult>> Callback;

任务的优先级.优先级较高的任务会在优先级较低的任务之前执行.

int WorkPriority;

指定 System.Threading.Thread 的调度优先级.

ThreadPriority ThreadPriority;

获取/设置线程池中线程的后台运行状态.

bool IsBackground;

此任务依赖的一组任务.在所有依赖的任务执行完成之前, 此任务不会开始.

ConcurrentSet<string> Dependents;

是否为长时间运行的任务.

bool LongRunning;

如果执行失败, 是否重试该任务.

RetryOption RetryOption;

是否存储任务结果.

bool StorageResult;
⚠️ **GitHub.com Fallback** ⚠️