A comprehensive and efficient low-contention thread pool for easily managing both sync and async workloads. It provides granular work control, flexible concurrency, and robust error handling.
$ dotnet add package PowerThreadPool
Offers comprehensive and efficient thread pool management with features like granular work control, dependencies, customizable concurrency, events, priority handling, timeout options, callbacks, error handling, and load balancing, alongside an easy-to-use API for diverse task submissions.
Read the Wiki here.
PowerThreadPool is available as Nuget Package now.
Support: Net46+ | Net5.0+
PowerPool powerPool = new PowerPool(new PowerPoolOption() { /* Some options */ });
powerPool.QueueWorkItem(() =>
{
// DO SOMETHING
});PowerPool powerPool = new PowerPool(new PowerPoolOption() { /* Some options */ });
powerPool.QueueWorkItem(() =>
{
// DO SOMETHING
return result;
}, (res) =>
{
// Callback of the work
});PowerPool powerPool = new PowerPool(new PowerPoolOption() { /* Some options */ });
powerPool.QueueWorkItem(() =>
{
// DO SOMETHING
return result;
}, new WorkOption()
{
// Some options
});string QueueWorkItem(Action action, *);
string QueueWorkItem(Action<object[]> action, object[] param, *);
string QueueWorkItem<T1, ...>(Action<T1, ...> action, T1 param1, ..., *);
string QueueWorkItem<T1, ..., TResult>(Func<T1, ..., TResult> function, T1 param1, ..., *);
string QueueWorkItem<TResult>(Func<TResult> function, *);
string QueueWorkItem<TResult>(Func<object[], TResult> function, object[] param, *);