Soenneker.ConcurrentProcessing.Executor 4.0.211

Prefix Reserved
dotnet add package Soenneker.ConcurrentProcessing.Executor --version 4.0.211
                    
NuGet\Install-Package Soenneker.ConcurrentProcessing.Executor -Version 4.0.211
                    
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="Soenneker.ConcurrentProcessing.Executor" Version="4.0.211" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.ConcurrentProcessing.Executor" Version="4.0.211" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.ConcurrentProcessing.Executor" />
                    
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 Soenneker.ConcurrentProcessing.Executor --version 4.0.211
                    
#r "nuget: Soenneker.ConcurrentProcessing.Executor, 4.0.211"
                    
#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 Soenneker.ConcurrentProcessing.Executor@4.0.211
                    
#: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=Soenneker.ConcurrentProcessing.Executor&version=4.0.211
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.ConcurrentProcessing.Executor&version=4.0.211
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.ConcurrentProcessing.Executor

This executor efficiently handles multiple tasks with controlled concurrency. It is ideal for managing parallel execution of tasks while ensuring that no more than a specified number of tasks run simultaneously.

Key Features

  • Concurrent Execution: Limits the number of concurrent tasks to prevent overloading.
  • Failure Handling with Retry Logic: Automatically retries failed tasks with exponential backoff.
  • Async Semaphore: Uses a non-blocking semaphore to control concurrency and ensure thread safety.
  • CancellationToken support for task cancellation.

⚠️ Note:

  • This is not a background processor. It only manages concurrency for tasks that are provided during execution.

Installation

dotnet add package Soenneker.ConcurrentProcessing.Executor

Example: Executing Multiple Tasks with Concurrency Control

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Soenneker.ConcurrentProcessing.Executor;

public class Program
{
    public static async Task Main(string[] args)
    {
        var executor = new ConcurrentProcessingExecutor(maxConcurrency: 3);

        var tasks = new List<Func<CancellationToken, ValueTask>>
        {
            async (ct) => { 
                Console.WriteLine("Task 1 started"); 
                await Task.Delay(500, ct); 
                Console.WriteLine("Task 1 completed"); 
            },

            async (ct) => { 
                Console.WriteLine("Task 2 started"); 
                await Task.Delay(300, ct); 
                Console.WriteLine("Task 2 completed"); 
            },

            async (ct) => { 
                Console.WriteLine("Task 3 started"); 
                await Task.Delay(700, ct); 
                Console.WriteLine("Task 3 completed");
            },

            async (ct) => { 
                Console.WriteLine("Task 4 started"); 
                await Task.Delay(400, ct); 
                Console.WriteLine("Task 4 completed"); 
            }
        };

        await executor.Execute(tasks);
    }
}

Console Output

Task 1 started
Task 2 started
Task 3 started
Task 1 completed
Task 4 started
Task 2 completed
Task 3 completed
Task 4 completed
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.ConcurrentProcessing.Executor:

Package Downloads
Soenneker.Cosmos.Repository

A data persistence abstraction layer for Cosmos DB

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.211 82 12/12/2025
4.0.210 468 12/10/2025
4.0.209 311 12/10/2025
4.0.208 962 11/21/2025
4.0.207 388 11/21/2025
4.0.206 381 11/20/2025
4.0.205 383 11/20/2025
4.0.204 1,221 11/11/2025
4.0.203 334 11/11/2025
4.0.202 790 11/6/2025
4.0.201 252 11/6/2025
4.0.200 589 11/3/2025
4.0.199 179 11/3/2025
4.0.198 582 10/30/2025
4.0.197 318 10/30/2025
4.0.196 184 10/30/2025
4.0.195 234 10/30/2025
4.0.194 183 10/29/2025
3.0.193 937 10/16/2025
3.0.192 173 10/16/2025
3.0.191 1,971 9/10/2025
3.0.190 485 9/9/2025
3.0.189 175 9/9/2025
3.0.188 295 9/9/2025
3.0.187 904 9/3/2025
3.0.186 173 9/3/2025
3.0.185 429 9/3/2025
3.0.184 178 9/3/2025
3.0.183 185 9/3/2025
3.0.182 187 9/3/2025
3.0.181 189 9/3/2025
3.0.180 727 8/20/2025
3.0.179 1,375 8/11/2025
3.0.178 289 8/11/2025
3.0.177 235 8/11/2025
3.0.176 174 8/11/2025
3.0.175 172 8/11/2025
3.0.174 1,153 8/5/2025
3.0.173 362 8/5/2025
3.0.172 313 8/5/2025
3.0.171 1,420 7/9/2025
3.0.170 265 7/8/2025
3.0.169 328 7/8/2025
3.0.168 1,452 6/28/2025
3.0.167 302 6/27/2025
3.0.166 114 6/27/2025
3.0.165 110 6/27/2025
3.0.164 259 6/27/2025
3.0.163 1,519 6/10/2025
3.0.162 457 6/10/2025
3.0.161 381 6/10/2025
3.0.160 469 6/3/2025
3.0.159 943 5/27/2025
3.0.158 303 5/27/2025
3.0.157 173 5/27/2025
3.0.156 275 5/27/2025
3.0.155 1,332 5/23/2025
3.0.154 295 5/23/2025
3.0.153 206 5/23/2025
3.0.152 265 5/22/2025
3.0.151 903 5/14/2025
3.0.150 343 5/13/2025
3.0.149 1,088 5/8/2025
3.0.148 311 5/8/2025
3.0.147 167 5/8/2025
3.0.146 203 5/7/2025
3.0.145 617 5/5/2025
3.0.144 186 5/5/2025
3.0.143 166 5/5/2025
3.0.142 170 5/5/2025
3.0.141 193 5/5/2025
3.0.140 865 5/5/2025
3.0.139 1,970 4/8/2025
3.0.138 290 4/8/2025
3.0.137 203 4/8/2025
3.0.136 198 4/8/2025
3.0.135 204 4/8/2025
3.0.134 218 4/8/2025
3.0.133 197 4/8/2025
3.0.132 709 4/8/2025
3.0.131 439 4/8/2025
3.0.130 358 4/8/2025
3.0.129 533 4/8/2025
3.0.128 492 4/8/2025
3.0.127 404 4/7/2025
3.0.126 356 4/7/2025
3.0.125 643 4/7/2025
3.0.124 391 4/7/2025
3.0.123 534 4/7/2025
3.0.122 242 4/7/2025
3.0.121 207 4/7/2025
3.0.120 202 4/7/2025
3.0.119 183 4/6/2025
3.0.118 201 4/6/2025
3.0.117 206 4/6/2025
3.0.116 197 4/6/2025
3.0.115 182 4/6/2025
3.0.114 162 4/6/2025
3.0.113 158 4/6/2025
3.0.112 131 4/6/2025
3.0.111 168 4/6/2025
3.0.110 162 4/6/2025
3.0.109 159 4/6/2025
3.0.108 141 4/6/2025
3.0.107 113 4/5/2025
3.0.106 121 4/5/2025
3.0.105 122 4/5/2025
3.0.104 123 4/5/2025
3.0.103 118 4/5/2025
3.0.102 140 4/5/2025
3.0.101 126 4/5/2025
3.0.100 127 4/4/2025
3.0.99 135 4/4/2025
3.0.98 160 4/4/2025
3.0.97 3,076 4/3/2025
3.0.96 687 4/1/2025
3.0.95 389 4/1/2025
3.0.94 260 4/1/2025
3.0.93 618 3/31/2025
3.0.92 251 3/31/2025
3.0.91 495 3/31/2025
3.0.90 310 3/31/2025
3.0.89 352 3/29/2025
3.0.88 126 3/29/2025
3.0.87 225 3/29/2025
3.0.86 948 3/25/2025
3.0.85 626 3/25/2025
3.0.84 329 3/21/2025
3.0.83 341 3/21/2025
3.0.82 486 3/18/2025
3.0.81 372 3/18/2025
3.0.80 404 3/15/2025
3.0.79 192 3/15/2025
3.0.78 370 3/12/2025
3.0.77 203 3/12/2025
3.0.76 213 3/12/2025
3.0.75 225 3/12/2025
3.0.74 211 3/11/2025
3.0.73 245 3/11/2025
3.0.72 398 3/11/2025
3.0.71 634 3/11/2025
3.0.70 398 3/11/2025
3.0.69 322 3/11/2025
3.0.68 213 3/11/2025
3.0.67 339 3/11/2025
3.0.66 490 3/7/2025
3.0.65 342 3/7/2025
3.0.64 573 3/2/2025
3.0.63 390 3/2/2025
3.0.62 170 3/2/2025
3.0.61 265 3/2/2025
3.0.60 236 3/1/2025
3.0.59 297 3/1/2025
3.0.58 145 3/1/2025
3.0.57 232 3/1/2025
3.0.56 394 3/1/2025
3.0.55 159 3/1/2025
3.0.54 131 3/1/2025
3.0.53 141 3/1/2025
3.0.52 132 3/1/2025
3.0.51 279 3/1/2025
3.0.50 135 3/1/2025
3.0.49 490 2/25/2025
3.0.48 230 2/25/2025
3.0.47 231 2/25/2025
3.0.46 266 2/25/2025
3.0.45 161 2/25/2025
3.0.44 343 2/24/2025
3.0.43 252 2/23/2025
3.0.42 166 2/22/2025
3.0.41 447 2/22/2025
3.0.40 403 2/22/2025
3.0.39 313 2/22/2025
3.0.38 173 2/22/2025
3.0.37 273 2/22/2025
3.0.36 282 2/22/2025
3.0.35 160 2/21/2025
3.0.34 426 2/21/2025
3.0.33 259 2/21/2025
3.0.32 468 2/19/2025
3.0.31 617 2/18/2025
3.0.30 277 2/18/2025
3.0.29 374 2/18/2025
3.0.28 168 2/18/2025
3.0.27 498 2/14/2025
3.0.26 381 2/14/2025
3.0.25 274 2/13/2025
3.0.24 304 2/13/2025
3.0.23 459 2/12/2025
3.0.22 144 2/12/2025
3.0.21 282 2/12/2025
3.0.20 240 2/12/2025
3.0.19 367 2/11/2025
3.0.18 169 2/11/2025
3.0.17 450 2/11/2025
3.0.16 152 2/11/2025
3.0.15 257 2/11/2025
3.0.14 245 2/11/2025
3.0.13 167 2/11/2025
3.0.12 164 2/10/2025
3.0.11 136 2/10/2025
3.0.10 228 2/10/2025
3.0.9 277 2/10/2025
3.0.8 150 2/10/2025
3.0.7 145 2/10/2025
3.0.6 173 2/10/2025
3.0.5 141 2/10/2025
3.0.4 236 2/9/2025
3.0.3 386 2/9/2025
3.0.2 400 2/8/2025
3.0.1 395 2/7/2025