Soenneker.Utils.RateLimiting.Executor 3.0.439

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.RateLimiting.Executor --version 3.0.439
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 3.0.439
                    
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.Utils.RateLimiting.Executor" Version="3.0.439" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.RateLimiting.Executor" Version="3.0.439" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.RateLimiting.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.Utils.RateLimiting.Executor --version 3.0.439
                    
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 3.0.439"
                    
#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.Utils.RateLimiting.Executor@3.0.439
                    
#: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.Utils.RateLimiting.Executor&version=3.0.439
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.439
                    
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.Utils.RateLimiting.Executor

A thread-safe utility designed to manage the rate at which tasks are executed, ensuring they are not run more frequently than a specified interval.

RateLimitingExecutor is ideal for interacting with rate-limited APIs or throttling the execution of resource-intensive tasks.

Sequential Execution

Tasks, ValueTasks, and Actions are executed one at a time. If the defined interval between executions has passed, the task runs immediately; otherwise, it waits until the interval elapses before proceeding.

⚠️ Important Notes:

  • This is not a background queue processor. Each method awaits the result of the asynchronous operation before continuing.

  • Asynchronous methods will not block the calling thread, but synchronous methods will block execution until it completes.

Want to use this with dependency injection?

Check out the singleton factory implementation: Soenneker.Utils.RateLimiting.Factory

Installation

dotnet add package Soenneker.Utils.RateLimiting.Executor

Example: Executing a Loop of Tasks with Rate Limiting

Below is an example demonstrating how to use the RateLimitingExecutor to execute a series of tasks while maintaining a rate limit.

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Soenneker.Utils.RateLimiting.Executor;

public class Program
{
    public static async Task Main(string[] args)
    {
        var rateLimitingExecutor = new RateLimitingExecutor(TimeSpan.FromSeconds(2));

        for (int i = 0; i < 5; i++)
        {
            await rateLimitingExecutor.Execute(async ct =>
            {
                Console.WriteLine($"Executing Task {i + 1} at {DateTime.Now:HH:mm:ss}");
                await Task.Delay(100); // Simulate some work
            });
        }
    }
}

Console Output

Executing Task 1 at 14:00:00
Executing Task 2 at 14:00:02
Executing Task 3 at 14:00:04
Executing Task 4 at 14:00:06
Executing Task 5 at 14:00:08
Product Compatible and additional computed target framework versions.
.NET 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. 
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.Utils.RateLimiting.Executor:

Package Downloads
Soenneker.Utils.RateLimiting.Factory

An async thread-safe singleton dictionary for Soenneker.Utils.RateLimiting.Executors, designed to manage the rate at which tasks are executed.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.445 46 11/3/2025
4.0.444 240 10/30/2025
4.0.443 165 10/30/2025
4.0.442 164 10/30/2025
4.0.441 153 10/30/2025
4.0.440 220 10/29/2025
3.0.439 425 10/16/2025
3.0.438 743 9/9/2025
3.0.437 604 9/3/2025
3.0.436 172 9/3/2025
3.0.435 175 9/3/2025
3.0.434 163 9/3/2025
3.0.433 742 8/11/2025
3.0.432 279 8/11/2025
3.0.431 165 8/11/2025
3.0.430 154 8/11/2025
3.0.429 630 8/5/2025
3.0.428 917 7/9/2025
3.0.427 483 7/4/2025
3.0.426 322 7/3/2025
3.0.425 392 6/28/2025
3.0.424 209 6/27/2025
3.0.423 91 6/27/2025
3.0.422 98 6/27/2025
3.0.421 873 6/11/2025
3.0.420 591 6/3/2025
3.0.419 450 5/27/2025
3.0.418 183 5/27/2025
3.0.417 302 5/27/2025
3.0.416 677 5/23/2025
3.0.415 177 5/23/2025
3.0.414 198 5/22/2025
3.0.413 1,031 5/8/2025
3.0.412 200 5/7/2025
3.0.411 190 5/7/2025
3.0.410 618 5/5/2025
3.0.409 338 5/5/2025
3.0.408 166 5/5/2025
3.0.407 273 5/5/2025
3.0.406 196 5/5/2025
3.0.405 972 4/8/2025
3.0.404 215 4/8/2025
3.0.403 182 4/8/2025
3.0.402 601 4/8/2025
3.0.401 229 4/8/2025
3.0.400 217 4/8/2025
3.0.399 247 4/8/2025
3.0.398 202 4/8/2025
3.0.397 728 4/7/2025
3.0.396 232 4/7/2025
3.0.395 273 4/7/2025
3.0.394 456 4/7/2025
3.0.393 227 4/7/2025
3.0.392 224 4/7/2025
3.0.391 200 4/6/2025
3.0.390 215 4/6/2025
3.0.389 185 4/6/2025
3.0.388 180 4/6/2025
3.0.387 158 4/6/2025
3.0.386 154 4/6/2025
3.0.385 147 4/6/2025
3.0.384 149 4/6/2025
3.0.383 139 4/5/2025
3.0.382 137 4/5/2025
3.0.381 100 4/5/2025
3.0.380 137 4/5/2025
3.0.379 132 4/5/2025
3.0.378 122 4/5/2025
3.0.377 110 4/5/2025
3.0.376 159 4/4/2025
3.0.375 158 4/4/2025
3.0.374 2,099 4/3/2025
3.0.373 388 4/1/2025
3.0.372 272 4/1/2025
3.0.371 319 4/1/2025
3.0.370 273 3/31/2025
3.0.369 180 3/31/2025
3.0.368 317 3/31/2025
3.0.367 438 3/31/2025
3.0.366 274 3/29/2025
3.0.365 124 3/29/2025
3.0.364 179 3/29/2025
3.0.363 852 3/25/2025
3.0.362 558 3/25/2025
3.0.361 495 3/21/2025
3.0.360 225 3/21/2025
3.0.359 626 3/18/2025
3.0.358 350 3/18/2025
3.0.357 366 3/15/2025
3.0.356 94 3/15/2025
3.0.355 618 3/12/2025
3.0.354 242 3/12/2025
3.0.353 345 3/12/2025
3.0.352 224 3/11/2025
3.0.351 466 3/11/2025
3.0.350 306 3/11/2025
3.0.349 190 3/11/2025
3.0.348 627 3/11/2025
3.0.347 525 3/7/2025
3.0.346 469 3/7/2025
3.0.345 451 3/2/2025
3.0.344 225 3/2/2025
3.0.343 237 3/2/2025
3.0.342 138 3/2/2025
3.0.341 152 3/2/2025
3.0.340 326 3/2/2025
3.0.339 336 3/1/2025
3.0.338 144 3/1/2025
3.0.337 131 3/1/2025
3.0.336 670 3/1/2025
3.0.335 193 3/1/2025
3.0.334 126 3/1/2025
3.0.333 283 3/1/2025
3.0.332 140 3/1/2025
3.0.331 120 3/1/2025
3.0.330 490 2/25/2025
3.0.329 221 2/25/2025
3.0.328 273 2/25/2025
3.0.327 327 2/25/2025
3.0.326 225 2/25/2025
3.0.325 594 2/23/2025
3.0.324 232 2/23/2025
3.0.323 134 2/22/2025
3.0.322 568 2/22/2025
3.0.321 290 2/22/2025
3.0.320 193 2/22/2025
3.0.319 309 2/22/2025
3.0.318 141 2/21/2025
3.0.317 335 2/21/2025
3.0.316 388 2/21/2025
3.0.315 489 2/19/2025
3.0.314 196 2/19/2025
3.0.313 195 2/19/2025
3.0.312 139 2/18/2025
3.0.311 470 2/18/2025
3.0.310 255 2/18/2025
3.0.309 147 2/18/2025
3.0.308 681 2/14/2025
3.0.307 132 2/14/2025
3.0.306 273 2/13/2025
3.0.305 612 2/12/2025
3.0.304 192 2/12/2025
3.0.303 274 2/12/2025
3.0.302 301 2/11/2025
3.0.301 266 2/11/2025
3.0.300 493 2/11/2025
3.0.299 399 2/11/2025
3.0.298 150 2/11/2025
3.0.297 302 2/11/2025
3.0.296 286 2/10/2025
3.0.295 217 2/10/2025
3.0.294 305 2/10/2025
3.0.293 139 2/10/2025
3.0.292 132 2/10/2025
3.0.291 613 2/9/2025
3.0.290 167 2/8/2025
3.0.289 138 2/8/2025
3.0.288 131 2/8/2025
3.0.287 149 2/8/2025
3.0.286 503 2/8/2025
3.0.285 177 2/7/2025
3.0.284 208 2/7/2025
3.0.283 378 2/7/2025
3.0.282 120 2/7/2025
3.0.281 141 2/7/2025
3.0.280 131 2/7/2025
3.0.279 206 2/7/2025
3.0.278 135 2/7/2025
3.0.277 147 2/7/2025
3.0.276 595 2/6/2025
3.0.275 390 2/5/2025
3.0.274 230 2/5/2025
3.0.273 138 2/5/2025
3.0.272 173 2/5/2025
3.0.271 389 2/5/2025
3.0.270 151 2/5/2025
3.0.269 123 2/5/2025
3.0.268 797 1/28/2025
3.0.267 148 1/28/2025
3.0.266 143 1/28/2025
3.0.265 593 1/27/2025
3.0.264 170 1/27/2025
3.0.263 127 1/27/2025
3.0.262 128 1/27/2025
3.0.261 236 1/27/2025
3.0.260 161 1/27/2025
3.0.259 451 1/26/2025
3.0.258 155 1/26/2025
3.0.257 163 1/26/2025
3.0.256 115 1/26/2025
3.0.255 280 1/25/2025
3.0.254 343 1/25/2025
3.0.253 125 1/25/2025
3.0.252 139 1/25/2025
3.0.251 128 1/25/2025
3.0.250 317 1/25/2025
3.0.249 678 1/24/2025
3.0.248 210 1/24/2025
3.0.247 348 1/24/2025
3.0.246 273 1/24/2025
3.0.245 435 1/24/2025
3.0.244 330 1/23/2025
3.0.243 438 1/21/2025
3.0.242 145 1/21/2025
3.0.241 279 1/21/2025
3.0.240 149 1/21/2025
3.0.239 150 1/21/2025
3.0.238 471 1/21/2025
3.0.237 129 1/21/2025
3.0.236 125 1/21/2025
3.0.235 127 1/21/2025
3.0.234 133 1/21/2025
3.0.233 114 1/20/2025
3.0.232 143 1/20/2025
3.0.231 1,003 1/20/2025
3.0.230 124 1/20/2025
3.0.229 128 1/20/2025
3.0.228 383 1/20/2025
3.0.227 3,423 1/14/2025
3.0.226 110 1/14/2025
3.0.225 119 1/14/2025
3.0.224 265 1/14/2025
3.0.223 356 1/13/2025
3.0.222 322 1/13/2025
3.0.221 220 1/13/2025
3.0.220 124 1/13/2025
3.0.219 126 1/13/2025
3.0.218 403 1/12/2025
3.0.217 276 1/11/2025
3.0.216 223 1/11/2025
3.0.215 241 1/11/2025
3.0.214 144 1/11/2025
3.0.213 212 1/10/2025
3.0.212 137 1/10/2025
3.0.211 125 1/10/2025
3.0.210 147 1/10/2025
3.0.209 428 1/10/2025
3.0.208 152 1/10/2025
3.0.207 152 1/10/2025
3.0.206 885 1/3/2025
3.0.205 169 1/3/2025
3.0.204 241 1/3/2025
3.0.203 180 1/3/2025
3.0.202 322 1/2/2025
3.0.201 143 1/2/2025
3.0.200 141 1/2/2025
3.0.199 283 1/2/2025
3.0.198 144 1/2/2025
3.0.197 136 1/2/2025
3.0.196 656 1/1/2025
3.0.195 291 1/1/2025
3.0.194 155 1/1/2025
3.0.193 181 1/1/2025
3.0.192 331 1/1/2025
3.0.191 146 1/1/2025
3.0.190 149 1/1/2025
3.0.189 161 12/31/2024
3.0.188 140 12/31/2024
3.0.187 133 12/31/2024
3.0.186 150 12/31/2024
3.0.185 161 12/31/2024
3.0.184 235 12/31/2024
3.0.183 154 12/31/2024
3.0.182 672 12/31/2024
3.0.181 150 12/31/2024
3.0.180 423 12/31/2024
3.0.179 256 12/31/2024
3.0.178 139 12/31/2024
3.0.177 156 12/31/2024
3.0.176 143 12/31/2024
3.0.175 133 12/31/2024
3.0.174 171 12/30/2024
3.0.173 608 12/28/2024
3.0.172 169 12/28/2024
3.0.171 252 12/27/2024
3.0.170 133 12/27/2024
3.0.169 737 12/24/2024
3.0.168 326 12/24/2024
3.0.167 197 12/24/2024
3.0.166 132 12/24/2024
3.0.165 261 12/24/2024
3.0.164 113 12/24/2024
3.0.163 301 12/24/2024
3.0.162 110 12/24/2024
3.0.161 203 12/24/2024
3.0.160 153 12/23/2024
3.0.159 231 12/23/2024
3.0.158 282 12/23/2024
3.0.157 144 12/23/2024
3.0.156 454 12/23/2024
3.0.155 158 12/23/2024
3.0.154 438 12/22/2024
3.0.153 125 12/22/2024
3.0.152 146 12/22/2024
3.0.151 329 12/22/2024
3.0.150 140 12/22/2024
3.0.149 147 12/22/2024
3.0.148 141 12/22/2024
3.0.147 456 12/22/2024
3.0.146 126 12/22/2024
3.0.145 152 12/22/2024
3.0.144 161 12/22/2024
3.0.143 445 12/21/2024
3.0.142 141 12/21/2024
3.0.141 145 12/21/2024
3.0.140 142 12/21/2024
3.0.139 143 12/21/2024
3.0.138 144 12/21/2024
3.0.137 125 12/21/2024
3.0.136 146 12/21/2024
3.0.135 463 12/21/2024
3.0.134 281 12/21/2024
3.0.133 138 12/21/2024
3.0.132 143 12/21/2024
3.0.131 145 12/21/2024
3.0.130 390 12/21/2024
3.0.129 157 12/21/2024
3.0.128 212 12/20/2024
3.0.127 139 12/20/2024
3.0.126 282 12/20/2024
3.0.125 147 12/20/2024
3.0.124 310 12/20/2024
3.0.123 288 12/20/2024
3.0.122 162 12/20/2024
3.0.121 277 12/20/2024
3.0.120 317 12/19/2024
3.0.119 284 12/19/2024
3.0.118 141 12/19/2024
3.0.117 234 12/19/2024
3.0.116 132 12/18/2024
3.0.115 230 12/18/2024
3.0.114 321 12/17/2024
3.0.113 176 12/17/2024
3.0.112 127 12/17/2024
3.0.111 358 12/16/2024
3.0.110 461 12/10/2024
3.0.109 171 12/10/2024
3.0.108 268 12/10/2024
3.0.107 140 12/9/2024
3.0.106 273 12/9/2024
3.0.105 362 12/9/2024
3.0.104 140 12/9/2024
3.0.103 501 12/7/2024
3.0.102 187 12/6/2024
3.0.101 170 12/6/2024
3.0.100 172 12/6/2024
3.0.99 182 12/6/2024
3.0.97 218 12/6/2024
3.0.96 186 12/6/2024
3.0.95 150 12/6/2024
3.0.94 148 12/6/2024
3.0.93 146 12/6/2024
3.0.92 142 12/6/2024
3.0.91 200 12/6/2024
3.0.90 167 12/5/2024
3.0.89 198 12/5/2024
3.0.88 1,126 12/5/2024
3.0.87 222 12/5/2024
3.0.86 207 12/5/2024
3.0.85 298 12/5/2024
3.0.84 191 12/4/2024
3.0.83 232 12/4/2024
3.0.82 308 12/4/2024
3.0.81 306 12/4/2024
3.0.80 249 12/4/2024
3.0.79 148 12/3/2024
3.0.78 320 12/3/2024
3.0.77 304 12/3/2024
3.0.76 256 12/3/2024
3.0.75 135 12/3/2024
3.0.74 231 12/3/2024
3.0.73 139 12/3/2024
3.0.72 601 12/2/2024
3.0.71 242 12/2/2024
3.0.70 244 12/2/2024
3.0.69 147 12/2/2024
3.0.68 273 12/2/2024
3.0.67 373 12/1/2024
3.0.66 159 12/1/2024
3.0.65 428 12/1/2024
3.0.64 204 12/1/2024
3.0.63 337 11/29/2024
3.0.62 293 11/29/2024
3.0.61 440 11/21/2024
3.0.60 168 11/21/2024
3.0.59 412 11/20/2024
3.0.58 129 11/20/2024
3.0.57 181 11/20/2024
3.0.56 154 11/20/2024
3.0.55 141 11/20/2024
3.0.54 177 11/20/2024
3.0.53 156 11/19/2024
3.0.52 131 11/19/2024
3.0.51 138 11/19/2024
3.0.50 569 11/19/2024
3.0.49 134 11/19/2024
3.0.48 497 11/19/2024
3.0.47 125 11/19/2024
3.0.46 133 11/19/2024
3.0.45 509 11/15/2024
3.0.44 213 11/14/2024
3.0.43 162 11/14/2024
3.0.42 144 11/14/2024
3.0.41 234 11/14/2024
3.0.40 152 11/14/2024
3.0.39 362 11/14/2024
3.0.38 514 11/14/2024
3.0.37 263 11/14/2024
3.0.36 149 11/14/2024
3.0.35 128 11/14/2024
3.0.34 221 11/14/2024
3.0.33 152 11/14/2024
3.0.32 321 11/14/2024
2.1.31 476 11/13/2024
2.1.30 293 11/13/2024
2.1.29 404 11/13/2024
2.1.28 223 11/12/2024
2.1.27 125 11/12/2024
2.1.26 870 11/9/2024
2.1.25 285 11/9/2024
2.1.24 572 11/8/2024
2.1.23 176 11/8/2024
2.1.22 140 11/8/2024
2.1.21 451 11/8/2024
2.1.20 353 11/8/2024
2.1.19 442 11/6/2024
2.1.18 517 11/1/2024
2.1.17 145 11/1/2024
2.1.16 541 11/1/2024
2.1.14 145 10/29/2024
2.1.13 393 10/29/2024
2.1.12 214 10/29/2024
2.1.11 670 10/29/2024
2.1.10 397 10/28/2024
2.1.9 126 10/28/2024
2.1.8 192 10/28/2024
2.1.7 477 10/26/2024
2.1.6 196 10/26/2024
2.1.5 416 10/22/2024
2.1.4 163 10/22/2024
2.1.3 149 10/22/2024
2.1.2 162 10/22/2024
2.1.1 200 10/22/2024