-
Notifications
You must be signed in to change notification settings - Fork 16
Timeout
ZjzMisaka edited this page Aug 26, 2025
·
2 revisions
PowerPoolOption.TimeoutOption: Represents the maximum amount of time that all works in a thread pool can run collectively before they are terminated. It includes a duration in milliseconds (ms) and a boolean flag for forcefully stopping the work.
PowerPoolOption.DefaultWorkTimeoutOption: Represents the default maximum amount of time a work in the pool can run before it is terminated. It includes a duration in milliseconds (ms) and a boolean flag for forcefully stopping the work.
PowerPool powerPool = new PowerPool();
powerPool.PowerPoolOption = new PowerPoolOption()
{
TimeoutOption = new TimeoutOption() { Duration = 10000, ForceStop = false },
DefaultWorkTimeoutOption = new TimeoutOption() { Duration = 3000, ForceStop = false },
};WorkOption.TimeoutOption: Represents the maximum amount of time a specific work can run before it is terminated. It includes a duration in milliseconds (ms) and a boolean flag for forcefully stopping the work.
powerPool.QueueWorkItem(() =>
{
// Do something
}, new WorkOption()
{
TimeoutOption = new TimeoutOption() { Duration = 2000, ForceStop = true }
});- Sync | Async
- Pool Control | Work Control
- Divide And Conquer
- Thread Pool Sizing
- Work Callback | Default Callback
- Rejection Policy
- Parallel Execution
- Work Priority | Thread Priority
- Error Handling
- Work Timeout | Cumulative Work Timeout
- Work Dependency
- Work Group
- Events
- Runtime Status
- Running Timer
- Queue Type (FIFO | LIFO | Deque | Custom)
Core
Results
Options