PowerThreadPool 4.22.5

dotnet add package PowerThreadPool --version 4.22.5
                    
NuGet\Install-Package PowerThreadPool -Version 4.22.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PowerThreadPool" Version="4.22.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PowerThreadPool" Version="4.22.5" />
                    
Directory.Packages.props
<PackageReference Include="PowerThreadPool" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PowerThreadPool --version 4.22.5
                    
#r "nuget: PowerThreadPool, 4.22.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PowerThreadPool@4.22.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PowerThreadPool&version=4.22.5
                    
Install as a Cake Addin
#tool nuget:?package=PowerThreadPool&version=4.22.5
                    
Install as a Cake Tool

PowerThreadPool

icon

Nuget Nuget GitHub release (with filter) GitHub Repo stars GitHub Workflow Status (with event) Codecov CodeFactor

All Contributors

A comprehensive and efficient lock-free thread pool with granular work control, flexible concurrency, robust error handling, and easy work management for both sync and async workloads.

Documentation

Access the Wiki in English | 中文 | 日本語.
Visit the DeepWiki for more information.

Pack

powershell -File build.ps1 -Version {Version}

Installation

If you want to include PowerThreadPool in your project, you can install it directly from NuGet.
Support: Net40+ | Net5.0+ | netstandard2.0+

Features

Getting started

Out-of-the-box: Run a simple work

PowerThreadPool is designed to be out-of-the-box. For simple works, you can get started without any complex configuration.

PowerPool powerPool = new PowerPool();
// Sync
powerPool.QueueWorkItem(() => 
{
    // Do something
});
// Async
powerPool.QueueWorkItemAsync(async () =>
{
    // Do something
    // await ...;
});

With callback

PowerPool powerPool = new PowerPool(new PowerPoolOption() { /* Some options */ });
// Sync
powerPool.QueueWorkItem(() => 
{
    // Do something
    return result;
}, (res) => 
{
    // Callback of the work
});
// Async
powerPool.QueueWorkItemAsync(async () =>
{
    // Do something
    // await ...;
}, (res) =>
{
    // Callback of the work
});

With option

PowerPool powerPool = new PowerPool(new PowerPoolOption() { /* Some options */ });
// Sync
powerPool.QueueWorkItem(() => 
{
    // Do something
    return result;
}, new WorkOption()
{
    // Some options
});
// Async
powerPool.QueueWorkItemAsync(async () =>
{
    // Do something
    // await ...;
}, new WorkOption()
{
    // Some options
});

Reference

string QueueWorkItem<T1, ...>(Action<T1, ...> action, T1 param1, ..., *);
string QueueWorkItem(Action action, *);
string QueueWorkItem(Action<object[]> action, object[] param, *);
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, *);
string QueueWorkItemAsync(Func<Task> asyncFunc, *);
string QueueWorkItemAsync<TResult>(Func<Task<TResult>> asyncFunc, *);
string QueueWorkItemAsync(Func<Task> asyncFunc, out Task task, *);
string QueueWorkItemAsync<TResult>(Func<Task<TResult>> asyncFunc, out Task<ExecuteResult<TResult>> task, *);
  • Asterisk (*) denotes an optional parameter, either a WorkOption or a delegate (Action<ExecuteResult<object>> or Action<ExecuteResult<TResult>>), depending on whether the first parameter is an Action or a Func.
  • In places where you see ellipses (...), you can provide up to five generic type parameters.

More

Testing And Performance Analysis | Feature Comparison
Get involved: Join our growing community

Contributors ✨

Thanks goes to these wonderful people (emoji key):

<table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/dlnn"><img src="https://avatars.githubusercontent.com/u/22004270?v=4?s=100" width="100px;" alt="一条咸鱼"/><br /><sub><b>一条咸鱼</b></sub></a><br /><a href="https://github.com/ZjzMisaka/PowerThreadPool/commits?author=dlnn" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ZjzMisaka"><img src="https://avatars.githubusercontent.com/u/16731853?v=4?s=100" width="100px;" alt="ZjzMisaka"/><br /><sub><b>ZjzMisaka</b></sub></a><br /><a href="https://github.com/ZjzMisaka/PowerThreadPool/commits?author=ZjzMisaka" title="Code">💻</a> <a href="#maintenance-ZjzMisaka" title="Maintenance">🚧</a> <a href="https://github.com/ZjzMisaka/PowerThreadPool/commits?author=ZjzMisaka" title="Documentation">📖</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/r00tee"><img src="https://avatars.githubusercontent.com/u/32619657?v=4?s=100" width="100px;" alt="r00tee"/><br /><sub><b>r00tee</b></sub></a><br /><a href="#ideas-r00tee" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/aadog"><img src="https://avatars.githubusercontent.com/u/18098725?v=4?s=100" width="100px;" alt="aadog"/><br /><sub><b>aadog</b></sub></a><br /><a href="https://github.com/ZjzMisaka/PowerThreadPool/issues?q=author%3Aaadog" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/RookieZWH"><img src="https://avatars.githubusercontent.com/u/17580767?v=4?s=100" width="100px;" alt="RookieZWH"/><br /><sub><b>RookieZWH</b></sub></a><br /><a href="#question-RookieZWH" title="Answering Questions">💬</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/hebinary"><img src="https://avatars.githubusercontent.com/u/86285187?v=4?s=100" width="100px;" alt="hebinary"/><br /><sub><b>hebinary</b></sub></a><br /><a href="#question-hebinary" title="Answering Questions">💬</a></td> </tr> </tbody> </table>

This project follows the all-contributors specification. Contributions of any kind welcome!

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net40 is compatible.  net403 was computed.  net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.0

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.5.1

    • No dependencies.
  • .NETFramework 4.5.2

    • No dependencies.
  • .NETFramework 4.6

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.7.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net5.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.22.5 49 9/7/2025
4.22.4 145 9/3/2025
4.22.3 145 8/31/2025
4.22.2 172 8/28/2025
4.22.1 193 8/26/2025
4.22.0 124 8/19/2025
4.21.1 136 8/11/2025
4.21.0 478 7/21/2025
4.20.3 64 7/18/2025
4.20.2 145 7/15/2025
4.20.1 201 7/13/2025 4.20.1 is deprecated because it has critical bugs.
4.20.0 184 6/18/2025
4.19.0 149 6/17/2025
4.18.3 357 6/10/2025
4.18.2 174 5/29/2025
4.18.1 249 5/16/2025
4.18.0 170 5/8/2025
4.17.0 175 4/27/2025
4.16.4 209 3/20/2025
4.16.3 202 3/3/2025
4.16.2 157 2/21/2025
4.16.1 177 2/4/2025
4.16.0 158 1/19/2025
4.15.0 166 1/3/2025
4.14.2 165 12/18/2024
4.14.1.1 156 12/13/2024
4.14.1 151 12/13/2024 4.14.1 is deprecated because it has critical bugs.
4.14.0 160 12/4/2024
4.13.0 172 11/14/2024
4.12.1 170 11/9/2024
4.12.0 183 10/16/2024
4.11.1 168 9/29/2024
4.11.0 149 9/24/2024
4.10.0 229 9/18/2024
4.9.1 200 9/1/2024
4.9.0 184 8/24/2024
4.8.2 181 8/18/2024
4.8.1 147 7/27/2024
4.8.0 189 7/21/2024
4.7.0 177 7/18/2024
4.6.0 162 6/30/2024
4.5.1 193 5/29/2024
4.5.0 164 5/24/2024
4.4.0 140 5/20/2024
4.3.0 151 5/16/2024
4.2.0 158 5/13/2024
4.1.0 162 5/11/2024
4.0.4 176 5/9/2024
4.0.3 250 5/5/2024
4.0.2 185 5/4/2024
4.0.1 154 4/27/2024
4.0.0 160 4/24/2024
3.2.0 166 4/22/2024
3.1.0 163 4/20/2024
3.0.0 157 4/18/2024
2.5.11 176 4/15/2024
2.5.10 165 4/12/2024
2.5.9 158 4/8/2024
2.5.8 191 3/26/2024
2.5.7 181 3/22/2024
2.5.6 171 3/12/2024
2.5.5 207 3/2/2024
2.5.4 160 2/29/2024
2.5.3 177 2/29/2024
2.5.2 186 2/26/2024
2.5.1 176 2/25/2024
2.5.0 202 2/8/2024
2.4.0 242 12/5/2023
2.3.0 144 12/5/2023
2.2.3 161 12/4/2023
2.2.2 141 12/3/2023
2.2.1 182 11/21/2023
2.2.0 146 11/12/2023
2.1.4 134 11/11/2023
2.1.3 141 11/11/2023
2.1.2 136 11/11/2023
2.1.1 143 11/6/2023
2.1.0 138 11/5/2023
2.0.1 183 10/23/2023
2.0.0 168 10/22/2023
1.5.10 181 9/24/2023
1.5.9 173 9/24/2023
1.5.8 161 9/18/2023
1.5.7 154 9/17/2023
1.5.6 187 9/8/2023
1.5.5 184 9/7/2023
1.5.4 195 9/6/2023
1.5.3 199 9/5/2023
1.5.2 174 9/4/2023
1.5.1 197 9/3/2023
1.5.0 187 9/2/2023
1.4.5 192 9/1/2023
1.4.4 183 9/1/2023
1.4.3 176 8/31/2023
1.4.2 179 8/30/2023
1.4.1 288 8/30/2023 1.4.1 is deprecated because it has critical bugs.
1.4.0 237 8/30/2023 1.4.0 is deprecated because it has critical bugs.
1.3.2 211 8/29/2023
1.3.1 194 8/28/2023
1.3.0 199 8/28/2023
1.2.1 199 8/28/2023
1.2.0 204 8/27/2023
1.1.0 216 8/27/2023
1.0.2 198 8/26/2023
1.0.1 198 8/26/2023
1.0.0 201 8/26/2023