Soenneker.Utils.RateLimiting.Executor 3.0.342

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.342
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 3.0.342
                    
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.342" />
                    
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.342" />
                    
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.342
                    
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 3.0.342"
                    
#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.342
                    
#: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.342
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.342
                    
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.452 548 11/21/2025
4.0.451 383 11/20/2025
4.0.450 379 11/20/2025
4.0.449 539 11/20/2025
4.0.448 748 11/11/2025
4.0.447 453 11/6/2025
4.0.446 279 11/6/2025
4.0.445 182 11/3/2025
4.0.444 405 10/30/2025
4.0.443 190 10/30/2025
4.0.442 188 10/30/2025
4.0.441 175 10/30/2025
4.0.440 288 10/29/2025
3.0.439 522 10/16/2025
3.0.438 746 9/9/2025
3.0.437 609 9/3/2025
3.0.436 180 9/3/2025
3.0.435 181 9/3/2025
3.0.434 170 9/3/2025
3.0.433 749 8/11/2025
3.0.432 287 8/11/2025
3.0.431 172 8/11/2025
3.0.430 157 8/11/2025
3.0.429 634 8/5/2025
3.0.428 921 7/9/2025
3.0.427 488 7/4/2025
3.0.426 326 7/3/2025
3.0.425 396 6/28/2025
3.0.424 214 6/27/2025
3.0.423 100 6/27/2025
3.0.422 104 6/27/2025
3.0.421 881 6/11/2025
3.0.420 594 6/3/2025
3.0.419 454 5/27/2025
3.0.418 189 5/27/2025
3.0.417 305 5/27/2025
3.0.416 684 5/23/2025
3.0.415 184 5/23/2025
3.0.414 203 5/22/2025
3.0.413 1,041 5/8/2025
3.0.412 207 5/7/2025
3.0.411 195 5/7/2025
3.0.410 624 5/5/2025
3.0.409 344 5/5/2025
3.0.408 173 5/5/2025
3.0.407 278 5/5/2025
3.0.406 200 5/5/2025
3.0.405 980 4/8/2025
3.0.404 222 4/8/2025
3.0.403 188 4/8/2025
3.0.402 604 4/8/2025
3.0.401 236 4/8/2025
3.0.400 224 4/8/2025
3.0.399 252 4/8/2025
3.0.398 206 4/8/2025
3.0.397 734 4/7/2025
3.0.396 235 4/7/2025
3.0.395 278 4/7/2025
3.0.394 458 4/7/2025
3.0.393 230 4/7/2025
3.0.392 229 4/7/2025
3.0.391 206 4/6/2025
3.0.390 221 4/6/2025
3.0.389 188 4/6/2025
3.0.388 182 4/6/2025
3.0.387 161 4/6/2025
3.0.386 160 4/6/2025
3.0.385 150 4/6/2025
3.0.384 153 4/6/2025
3.0.383 143 4/5/2025
3.0.382 143 4/5/2025
3.0.381 105 4/5/2025
3.0.380 143 4/5/2025
3.0.379 138 4/5/2025
3.0.378 125 4/5/2025
3.0.377 116 4/5/2025
3.0.376 163 4/4/2025
3.0.375 163 4/4/2025
3.0.374 2,110 4/3/2025
3.0.373 391 4/1/2025
3.0.372 277 4/1/2025
3.0.371 324 4/1/2025
3.0.370 277 3/31/2025
3.0.369 183 3/31/2025
3.0.368 324 3/31/2025
3.0.367 446 3/31/2025
3.0.366 279 3/29/2025
3.0.365 129 3/29/2025
3.0.364 184 3/29/2025
3.0.363 857 3/25/2025
3.0.362 563 3/25/2025
3.0.361 501 3/21/2025
3.0.360 228 3/21/2025
3.0.359 631 3/18/2025
3.0.358 359 3/18/2025
3.0.357 371 3/15/2025
3.0.356 97 3/15/2025
3.0.355 626 3/12/2025
3.0.354 244 3/12/2025
3.0.353 351 3/12/2025
3.0.352 228 3/11/2025
3.0.351 471 3/11/2025
3.0.350 310 3/11/2025
3.0.349 194 3/11/2025
3.0.348 636 3/11/2025
3.0.347 530 3/7/2025
3.0.346 473 3/7/2025
3.0.345 459 3/2/2025
3.0.344 228 3/2/2025
3.0.343 244 3/2/2025
3.0.342 144 3/2/2025
3.0.341 157 3/2/2025
3.0.340 329 3/2/2025
3.0.339 344 3/1/2025
3.0.338 151 3/1/2025
3.0.337 134 3/1/2025
3.0.336 674 3/1/2025
3.0.335 197 3/1/2025
3.0.334 131 3/1/2025
3.0.333 285 3/1/2025
3.0.332 145 3/1/2025
3.0.331 123 3/1/2025
3.0.330 495 2/25/2025
3.0.329 226 2/25/2025
3.0.328 280 2/25/2025
3.0.327 334 2/25/2025
3.0.326 228 2/25/2025
3.0.325 603 2/23/2025
3.0.324 237 2/23/2025
3.0.323 141 2/22/2025
3.0.322 574 2/22/2025
3.0.321 295 2/22/2025
3.0.320 198 2/22/2025
3.0.319 316 2/22/2025
3.0.318 146 2/21/2025
3.0.317 342 2/21/2025
3.0.316 394 2/21/2025
3.0.315 494 2/19/2025
3.0.314 203 2/19/2025
3.0.313 199 2/19/2025
3.0.312 144 2/18/2025
3.0.311 475 2/18/2025
3.0.310 261 2/18/2025
3.0.309 153 2/18/2025
3.0.308 687 2/14/2025
3.0.307 138 2/14/2025
3.0.306 278 2/13/2025
3.0.305 614 2/12/2025
3.0.304 197 2/12/2025
3.0.303 276 2/12/2025
3.0.302 309 2/11/2025
3.0.301 273 2/11/2025
3.0.300 500 2/11/2025
3.0.299 404 2/11/2025
3.0.298 153 2/11/2025
3.0.297 306 2/11/2025
3.0.296 289 2/10/2025
3.0.295 223 2/10/2025
3.0.294 310 2/10/2025
3.0.293 144 2/10/2025
3.0.292 137 2/10/2025
3.0.291 619 2/9/2025
3.0.290 170 2/8/2025
3.0.289 145 2/8/2025
3.0.288 134 2/8/2025
3.0.287 154 2/8/2025
3.0.286 508 2/8/2025
3.0.285 182 2/7/2025
3.0.284 215 2/7/2025
3.0.283 381 2/7/2025
3.0.282 126 2/7/2025
3.0.281 149 2/7/2025
3.0.280 135 2/7/2025
3.0.279 210 2/7/2025
3.0.278 138 2/7/2025
3.0.277 154 2/7/2025
3.0.276 602 2/6/2025
3.0.275 394 2/5/2025
3.0.274 235 2/5/2025
3.0.273 143 2/5/2025
3.0.272 176 2/5/2025
3.0.271 397 2/5/2025
3.0.270 154 2/5/2025
3.0.269 127 2/5/2025
3.0.268 802 1/28/2025
3.0.267 159 1/28/2025
3.0.266 145 1/28/2025
3.0.265 597 1/27/2025
3.0.264 174 1/27/2025
3.0.263 130 1/27/2025
3.0.262 134 1/27/2025
3.0.261 242 1/27/2025
3.0.260 163 1/27/2025
3.0.259 457 1/26/2025
3.0.258 161 1/26/2025
3.0.257 166 1/26/2025
3.0.256 119 1/26/2025
3.0.255 282 1/25/2025
3.0.254 346 1/25/2025
3.0.253 130 1/25/2025
3.0.252 144 1/25/2025
3.0.251 135 1/25/2025
3.0.250 320 1/25/2025
3.0.249 683 1/24/2025
3.0.248 216 1/24/2025
3.0.247 351 1/24/2025
3.0.246 277 1/24/2025
3.0.245 441 1/24/2025
3.0.244 337 1/23/2025
3.0.243 443 1/21/2025
3.0.242 148 1/21/2025
3.0.241 282 1/21/2025
3.0.240 155 1/21/2025
3.0.239 157 1/21/2025
3.0.238 475 1/21/2025
3.0.237 131 1/21/2025
3.0.236 128 1/21/2025
3.0.235 132 1/21/2025
3.0.234 137 1/21/2025
3.0.233 122 1/20/2025
3.0.232 148 1/20/2025
3.0.231 1,009 1/20/2025
3.0.230 128 1/20/2025
3.0.229 132 1/20/2025
3.0.228 386 1/20/2025
3.0.227 3,429 1/14/2025
3.0.226 115 1/14/2025
3.0.225 123 1/14/2025
3.0.224 270 1/14/2025
3.0.223 359 1/13/2025
3.0.222 330 1/13/2025
3.0.221 225 1/13/2025
3.0.220 130 1/13/2025
3.0.219 134 1/13/2025
3.0.218 407 1/12/2025
3.0.217 281 1/11/2025
3.0.216 229 1/11/2025
3.0.215 250 1/11/2025
3.0.214 149 1/11/2025
3.0.213 219 1/10/2025
3.0.212 147 1/10/2025
3.0.211 129 1/10/2025
3.0.210 152 1/10/2025
3.0.209 432 1/10/2025
3.0.208 158 1/10/2025
3.0.207 159 1/10/2025
3.0.206 889 1/3/2025
3.0.205 175 1/3/2025
3.0.204 245 1/3/2025
3.0.203 186 1/3/2025
3.0.202 331 1/2/2025
3.0.201 148 1/2/2025
3.0.200 148 1/2/2025
3.0.199 289 1/2/2025
3.0.198 151 1/2/2025
3.0.197 142 1/2/2025
3.0.196 663 1/1/2025
3.0.195 293 1/1/2025
3.0.194 159 1/1/2025
3.0.193 184 1/1/2025
3.0.192 336 1/1/2025
3.0.191 149 1/1/2025
3.0.190 154 1/1/2025
3.0.189 166 12/31/2024
3.0.188 146 12/31/2024
3.0.187 136 12/31/2024
3.0.186 157 12/31/2024
3.0.185 167 12/31/2024
3.0.184 240 12/31/2024
3.0.183 160 12/31/2024
3.0.182 682 12/31/2024
3.0.181 153 12/31/2024
3.0.180 426 12/31/2024
3.0.179 260 12/31/2024
3.0.178 144 12/31/2024
3.0.177 161 12/31/2024
3.0.176 145 12/31/2024
3.0.175 137 12/31/2024
3.0.174 173 12/30/2024
3.0.173 611 12/28/2024
3.0.172 172 12/28/2024
3.0.171 256 12/27/2024
3.0.170 137 12/27/2024
3.0.169 743 12/24/2024
3.0.168 332 12/24/2024
3.0.167 200 12/24/2024
3.0.166 135 12/24/2024
3.0.165 264 12/24/2024
3.0.164 116 12/24/2024
3.0.163 307 12/24/2024
3.0.162 113 12/24/2024
3.0.161 208 12/24/2024
3.0.160 156 12/23/2024
3.0.159 234 12/23/2024
3.0.158 287 12/23/2024
3.0.157 147 12/23/2024
3.0.156 460 12/23/2024
3.0.155 164 12/23/2024
3.0.154 443 12/22/2024
3.0.153 128 12/22/2024
3.0.152 153 12/22/2024
3.0.151 334 12/22/2024
3.0.150 145 12/22/2024
3.0.149 150 12/22/2024
3.0.148 149 12/22/2024
3.0.147 461 12/22/2024
3.0.146 131 12/22/2024
3.0.145 158 12/22/2024
3.0.144 166 12/22/2024
3.0.143 448 12/21/2024
3.0.142 146 12/21/2024
3.0.141 150 12/21/2024
3.0.140 148 12/21/2024
3.0.139 149 12/21/2024
3.0.138 154 12/21/2024
3.0.137 129 12/21/2024
3.0.136 151 12/21/2024
3.0.135 466 12/21/2024
3.0.134 287 12/21/2024
3.0.133 142 12/21/2024
3.0.132 146 12/21/2024
3.0.131 148 12/21/2024
3.0.130 393 12/21/2024
3.0.129 162 12/21/2024
3.0.128 218 12/20/2024
3.0.127 144 12/20/2024
3.0.126 285 12/20/2024
3.0.125 153 12/20/2024
3.0.124 315 12/20/2024
3.0.123 293 12/20/2024
3.0.122 170 12/20/2024
3.0.121 281 12/20/2024
3.0.120 323 12/19/2024
3.0.119 289 12/19/2024
3.0.118 145 12/19/2024
3.0.117 241 12/19/2024
3.0.116 137 12/18/2024
3.0.115 232 12/18/2024
3.0.114 326 12/17/2024
3.0.113 185 12/17/2024
3.0.112 132 12/17/2024
3.0.111 360 12/16/2024
3.0.110 466 12/10/2024
3.0.109 181 12/10/2024
3.0.108 275 12/10/2024
3.0.107 144 12/9/2024
3.0.106 277 12/9/2024
3.0.105 367 12/9/2024
3.0.104 145 12/9/2024
3.0.103 506 12/7/2024
3.0.102 192 12/6/2024
3.0.101 176 12/6/2024
3.0.100 175 12/6/2024
3.0.99 187 12/6/2024
3.0.97 222 12/6/2024
3.0.96 192 12/6/2024
3.0.95 155 12/6/2024
3.0.94 152 12/6/2024
3.0.93 150 12/6/2024
3.0.92 146 12/6/2024
3.0.91 203 12/6/2024
3.0.90 171 12/5/2024
3.0.89 208 12/5/2024
3.0.88 1,131 12/5/2024
3.0.87 229 12/5/2024
3.0.86 210 12/5/2024
3.0.85 304 12/5/2024
3.0.84 196 12/4/2024
3.0.83 238 12/4/2024
3.0.82 310 12/4/2024
3.0.81 314 12/4/2024
3.0.80 253 12/4/2024
3.0.79 152 12/3/2024
3.0.78 327 12/3/2024
3.0.77 310 12/3/2024
3.0.76 261 12/3/2024
3.0.75 137 12/3/2024
3.0.74 233 12/3/2024
3.0.73 144 12/3/2024
3.0.72 608 12/2/2024
3.0.71 245 12/2/2024
3.0.70 248 12/2/2024
3.0.69 153 12/2/2024
3.0.68 276 12/2/2024
3.0.67 378 12/1/2024
3.0.66 164 12/1/2024
3.0.65 431 12/1/2024
3.0.64 208 12/1/2024
3.0.63 341 11/29/2024
3.0.62 298 11/29/2024
3.0.61 445 11/21/2024
3.0.60 175 11/21/2024
3.0.59 416 11/20/2024
3.0.58 132 11/20/2024
3.0.57 184 11/20/2024
3.0.56 158 11/20/2024
3.0.55 145 11/20/2024
3.0.54 182 11/20/2024
3.0.53 159 11/19/2024
3.0.52 133 11/19/2024
3.0.51 142 11/19/2024
3.0.50 574 11/19/2024
3.0.49 137 11/19/2024
3.0.48 504 11/19/2024
3.0.47 128 11/19/2024
3.0.46 137 11/19/2024
3.0.45 511 11/15/2024
3.0.44 219 11/14/2024
3.0.43 168 11/14/2024
3.0.42 149 11/14/2024
3.0.41 238 11/14/2024
3.0.40 154 11/14/2024
3.0.39 369 11/14/2024
3.0.38 518 11/14/2024
3.0.37 267 11/14/2024
3.0.36 152 11/14/2024
3.0.35 133 11/14/2024
3.0.34 227 11/14/2024
3.0.33 159 11/14/2024
3.0.32 326 11/14/2024
2.1.31 478 11/13/2024
2.1.30 296 11/13/2024
2.1.29 407 11/13/2024
2.1.28 230 11/12/2024
2.1.27 127 11/12/2024
2.1.26 874 11/9/2024
2.1.25 290 11/9/2024
2.1.24 576 11/8/2024
2.1.23 183 11/8/2024
2.1.22 143 11/8/2024
2.1.21 456 11/8/2024
2.1.20 357 11/8/2024
2.1.19 447 11/6/2024
2.1.18 525 11/1/2024
2.1.17 151 11/1/2024
2.1.16 549 11/1/2024
2.1.14 149 10/29/2024
2.1.13 396 10/29/2024
2.1.12 217 10/29/2024
2.1.11 674 10/29/2024
2.1.10 405 10/28/2024
2.1.9 130 10/28/2024
2.1.8 198 10/28/2024
2.1.7 480 10/26/2024
2.1.6 200 10/26/2024
2.1.5 420 10/22/2024
2.1.4 165 10/22/2024
2.1.3 154 10/22/2024
2.1.2 167 10/22/2024
2.1.1 203 10/22/2024