PowerThreadPool
Enables efficient thread pool management with callback implementation, granular control, customizable concurrency, and support for diverse task submissions.
Documentation
Read the Wiki here.
Download
PowerThreadPool is available as Nuget Package now.
Support: Net46+ | Net5.0+
Features
- Work Control
- Work Dependency
- Thread Pool Sizing
- Idle Thread Timeout
- Work Priority | Thread Priority
- Work Timeout | Cumulative Work Timeout
- Callback
- Error Handling
- Runtime Status
- Load Balancing
Getting started
PowerPool powerPool = new PowerPool(new PowerPoolOption() { /* Some options */ });
powerPool.QueueWorkItem(() =>
{
// DO SOMETHING
});
With callback
PowerPool powerPool = new PowerPool(new PowerPoolOption() { /* Some options */ });
powerPool.QueueWorkItem(() =>
{
// DO SOMETHING
return result;
}, (res) =>
{
// Callback of the work
});
With option
PowerPool powerPool = new PowerPool(new PowerPoolOption() { /* Some options */ });
powerPool.QueueWorkItem(() =>
{
// DO SOMETHING
return result;
}, new WorkOption()
{
// Some options
});