Soenneker.Utils.RateLimiting.Executor 3.0.429

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.429
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 3.0.429
                    
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.429" />
                    
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.429" />
                    
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.429
                    
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 3.0.429"
                    
#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.429
                    
#: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.429
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.429
                    
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
3.0.438 294 9/9/2025
3.0.437 495 9/3/2025
3.0.436 155 9/3/2025
3.0.435 150 9/3/2025
3.0.434 146 9/3/2025
3.0.433 612 8/11/2025
3.0.432 239 8/11/2025
3.0.431 140 8/11/2025
3.0.430 140 8/11/2025
3.0.429 537 8/5/2025
3.0.428 730 7/9/2025
3.0.427 417 7/4/2025
3.0.426 283 7/3/2025
3.0.425 334 6/28/2025
3.0.424 173 6/27/2025
3.0.423 69 6/27/2025
3.0.422 82 6/27/2025
3.0.421 783 6/11/2025
3.0.420 512 6/3/2025
3.0.419 400 5/27/2025
3.0.418 164 5/27/2025
3.0.417 257 5/27/2025
3.0.416 567 5/23/2025
3.0.415 157 5/23/2025
3.0.414 170 5/22/2025
3.0.413 865 5/8/2025
3.0.412 179 5/7/2025
3.0.411 166 5/7/2025
3.0.410 510 5/5/2025
3.0.409 287 5/5/2025
3.0.408 149 5/5/2025
3.0.407 235 5/5/2025
3.0.406 176 5/5/2025
3.0.405 878 4/8/2025
3.0.404 182 4/8/2025
3.0.403 170 4/8/2025
3.0.402 508 4/8/2025
3.0.401 202 4/8/2025
3.0.400 190 4/8/2025
3.0.399 208 4/8/2025
3.0.398 180 4/8/2025
3.0.397 604 4/7/2025
3.0.396 200 4/7/2025
3.0.395 243 4/7/2025
3.0.394 387 4/7/2025
3.0.393 195 4/7/2025
3.0.392 202 4/7/2025
3.0.391 181 4/6/2025
3.0.390 182 4/6/2025
3.0.389 166 4/6/2025
3.0.388 155 4/6/2025
3.0.387 133 4/6/2025
3.0.386 129 4/6/2025
3.0.385 127 4/6/2025
3.0.384 129 4/6/2025
3.0.383 124 4/5/2025
3.0.382 113 4/5/2025
3.0.381 88 4/5/2025
3.0.380 118 4/5/2025
3.0.379 114 4/5/2025
3.0.378 103 4/5/2025
3.0.377 96 4/5/2025
3.0.376 140 4/4/2025
3.0.375 124 4/4/2025
3.0.374 1,730 4/3/2025
3.0.373 321 4/1/2025
3.0.372 232 4/1/2025
3.0.371 277 4/1/2025
3.0.370 236 3/31/2025
3.0.369 167 3/31/2025
3.0.368 271 3/31/2025
3.0.367 360 3/31/2025
3.0.366 233 3/29/2025
3.0.365 105 3/29/2025
3.0.364 145 3/29/2025
3.0.363 760 3/25/2025
3.0.362 528 3/25/2025
3.0.361 404 3/21/2025
3.0.360 190 3/21/2025
3.0.359 521 3/18/2025
3.0.358 298 3/18/2025
3.0.357 297 3/15/2025
3.0.356 79 3/15/2025
3.0.355 530 3/12/2025
3.0.354 217 3/12/2025
3.0.353 299 3/12/2025
3.0.352 194 3/11/2025
3.0.351 394 3/11/2025
3.0.350 268 3/11/2025
3.0.349 166 3/11/2025
3.0.348 522 3/11/2025
3.0.347 448 3/7/2025
3.0.346 407 3/7/2025
3.0.345 393 3/2/2025
3.0.344 182 3/2/2025
3.0.343 192 3/2/2025
3.0.342 110 3/2/2025
3.0.341 131 3/2/2025
3.0.340 274 3/2/2025
3.0.339 267 3/1/2025
3.0.338 116 3/1/2025
3.0.337 115 3/1/2025
3.0.336 536 3/1/2025
3.0.335 150 3/1/2025
3.0.334 102 3/1/2025
3.0.333 241 3/1/2025
3.0.332 108 3/1/2025
3.0.331 105 3/1/2025
3.0.330 394 2/25/2025
3.0.329 171 2/25/2025
3.0.328 223 2/25/2025
3.0.327 270 2/25/2025
3.0.326 192 2/25/2025
3.0.325 495 2/23/2025
3.0.324 192 2/23/2025
3.0.323 112 2/22/2025
3.0.322 452 2/22/2025
3.0.321 237 2/22/2025
3.0.320 159 2/22/2025
3.0.319 253 2/22/2025
3.0.318 118 2/21/2025
3.0.317 267 2/21/2025
3.0.316 325 2/21/2025
3.0.315 412 2/19/2025
3.0.314 163 2/19/2025
3.0.313 162 2/19/2025
3.0.312 121 2/18/2025
3.0.311 378 2/18/2025
3.0.310 206 2/18/2025
3.0.309 123 2/18/2025
3.0.308 549 2/14/2025
3.0.307 113 2/14/2025
3.0.306 233 2/13/2025
3.0.305 490 2/12/2025
3.0.304 146 2/12/2025
3.0.303 233 2/12/2025
3.0.302 249 2/11/2025
3.0.301 217 2/11/2025
3.0.300 391 2/11/2025
3.0.299 314 2/11/2025
3.0.298 125 2/11/2025
3.0.297 231 2/11/2025
3.0.296 244 2/10/2025
3.0.295 181 2/10/2025
3.0.294 247 2/10/2025
3.0.293 123 2/10/2025
3.0.292 115 2/10/2025
3.0.291 480 2/9/2025
3.0.290 134 2/8/2025
3.0.289 107 2/8/2025
3.0.288 113 2/8/2025
3.0.287 126 2/8/2025
3.0.286 419 2/8/2025
3.0.285 145 2/7/2025
3.0.284 178 2/7/2025
3.0.283 304 2/7/2025
3.0.282 107 2/7/2025
3.0.281 117 2/7/2025
3.0.280 111 2/7/2025
3.0.279 169 2/7/2025
3.0.278 114 2/7/2025
3.0.277 127 2/7/2025
3.0.276 483 2/6/2025
3.0.275 325 2/5/2025
3.0.274 196 2/5/2025
3.0.273 119 2/5/2025
3.0.272 137 2/5/2025
3.0.271 299 2/5/2025
3.0.270 128 2/5/2025
3.0.269 110 2/5/2025
3.0.268 642 1/28/2025
3.0.267 124 1/28/2025
3.0.266 121 1/28/2025
3.0.265 439 1/27/2025
3.0.264 139 1/27/2025
3.0.263 110 1/27/2025
3.0.262 103 1/27/2025
3.0.261 190 1/27/2025
3.0.260 131 1/27/2025
3.0.259 358 1/26/2025
3.0.258 127 1/26/2025
3.0.257 129 1/26/2025
3.0.256 98 1/26/2025
3.0.255 234 1/25/2025
3.0.254 280 1/25/2025
3.0.253 103 1/25/2025
3.0.252 113 1/25/2025
3.0.251 108 1/25/2025
3.0.250 257 1/25/2025
3.0.249 521 1/24/2025
3.0.248 169 1/24/2025
3.0.247 260 1/24/2025
3.0.246 207 1/24/2025
3.0.245 340 1/24/2025
3.0.244 238 1/23/2025
3.0.243 347 1/21/2025
3.0.242 121 1/21/2025
3.0.241 223 1/21/2025
3.0.240 126 1/21/2025
3.0.239 112 1/21/2025
3.0.238 377 1/21/2025
3.0.237 110 1/21/2025
3.0.236 111 1/21/2025
3.0.235 107 1/21/2025
3.0.234 114 1/21/2025
3.0.233 100 1/20/2025
3.0.232 129 1/20/2025
3.0.231 799 1/20/2025
3.0.230 110 1/20/2025
3.0.229 110 1/20/2025
3.0.228 301 1/20/2025
3.0.227 2,564 1/14/2025
3.0.226 90 1/14/2025
3.0.225 96 1/14/2025
3.0.224 209 1/14/2025
3.0.223 259 1/13/2025
3.0.222 244 1/13/2025
3.0.221 169 1/13/2025
3.0.220 108 1/13/2025
3.0.219 96 1/13/2025
3.0.218 297 1/12/2025
3.0.217 211 1/11/2025
3.0.216 177 1/11/2025
3.0.215 184 1/11/2025
3.0.214 123 1/11/2025
3.0.213 170 1/10/2025
3.0.212 120 1/10/2025
3.0.211 101 1/10/2025
3.0.210 114 1/10/2025
3.0.209 327 1/10/2025
3.0.208 121 1/10/2025
3.0.207 124 1/10/2025
3.0.206 767 1/3/2025
3.0.205 144 1/3/2025
3.0.204 196 1/3/2025
3.0.203 145 1/3/2025
3.0.202 252 1/2/2025
3.0.201 120 1/2/2025
3.0.200 119 1/2/2025
3.0.199 235 1/2/2025
3.0.198 119 1/2/2025
3.0.197 109 1/2/2025
3.0.196 531 1/1/2025
3.0.195 223 1/1/2025
3.0.194 132 1/1/2025
3.0.193 156 1/1/2025
3.0.192 264 1/1/2025
3.0.191 121 1/1/2025
3.0.190 127 1/1/2025
3.0.189 137 12/31/2024
3.0.188 122 12/31/2024
3.0.187 115 12/31/2024
3.0.186 127 12/31/2024
3.0.185 128 12/31/2024
3.0.184 194 12/31/2024
3.0.183 131 12/31/2024
3.0.182 534 12/31/2024
3.0.181 117 12/31/2024
3.0.180 336 12/31/2024
3.0.179 209 12/31/2024
3.0.178 120 12/31/2024
3.0.177 127 12/31/2024
3.0.176 122 12/31/2024
3.0.175 111 12/31/2024
3.0.174 147 12/30/2024
3.0.173 478 12/28/2024
3.0.172 138 12/28/2024
3.0.171 198 12/27/2024
3.0.170 109 12/27/2024
3.0.169 590 12/24/2024
3.0.168 255 12/24/2024
3.0.167 158 12/24/2024
3.0.166 117 12/24/2024
3.0.165 223 12/24/2024
3.0.164 101 12/24/2024
3.0.163 241 12/24/2024
3.0.162 96 12/24/2024
3.0.161 166 12/24/2024
3.0.160 128 12/23/2024
3.0.159 191 12/23/2024
3.0.158 228 12/23/2024
3.0.157 122 12/23/2024
3.0.156 363 12/23/2024
3.0.155 135 12/23/2024
3.0.154 346 12/22/2024
3.0.153 111 12/22/2024
3.0.152 124 12/22/2024
3.0.151 265 12/22/2024
3.0.150 124 12/22/2024
3.0.149 119 12/22/2024
3.0.148 115 12/22/2024
3.0.147 364 12/22/2024
3.0.146 112 12/22/2024
3.0.145 129 12/22/2024
3.0.144 130 12/22/2024
3.0.143 344 12/21/2024
3.0.142 120 12/21/2024
3.0.141 127 12/21/2024
3.0.140 114 12/21/2024
3.0.139 122 12/21/2024
3.0.138 118 12/21/2024
3.0.137 110 12/21/2024
3.0.136 119 12/21/2024
3.0.135 370 12/21/2024
3.0.134 232 12/21/2024
3.0.133 114 12/21/2024
3.0.132 121 12/21/2024
3.0.131 114 12/21/2024
3.0.130 310 12/21/2024
3.0.129 123 12/21/2024
3.0.128 184 12/20/2024
3.0.127 117 12/20/2024
3.0.126 229 12/20/2024
3.0.125 124 12/20/2024
3.0.124 247 12/20/2024
3.0.123 234 12/20/2024
3.0.122 129 12/20/2024
3.0.121 222 12/20/2024
3.0.120 251 12/19/2024
3.0.119 234 12/19/2024
3.0.118 122 12/19/2024
3.0.117 190 12/19/2024
3.0.116 107 12/18/2024
3.0.115 174 12/18/2024
3.0.114 261 12/17/2024
3.0.113 142 12/17/2024
3.0.112 102 12/17/2024
3.0.111 278 12/16/2024
3.0.110 371 12/10/2024
3.0.109 126 12/10/2024
3.0.108 213 12/10/2024
3.0.107 118 12/9/2024
3.0.106 216 12/9/2024
3.0.105 279 12/9/2024
3.0.104 117 12/9/2024
3.0.103 390 12/7/2024
3.0.102 151 12/6/2024
3.0.101 142 12/6/2024
3.0.100 143 12/6/2024
3.0.99 149 12/6/2024
3.0.97 177 12/6/2024
3.0.96 154 12/6/2024
3.0.95 130 12/6/2024
3.0.94 129 12/6/2024
3.0.93 122 12/6/2024
3.0.92 124 12/6/2024
3.0.91 166 12/6/2024
3.0.90 146 12/5/2024
3.0.89 150 12/5/2024
3.0.88 892 12/5/2024
3.0.87 179 12/5/2024
3.0.86 174 12/5/2024
3.0.85 243 12/5/2024
3.0.84 159 12/4/2024
3.0.83 195 12/4/2024
3.0.82 251 12/4/2024
3.0.81 243 12/4/2024
3.0.80 209 12/4/2024
3.0.79 125 12/3/2024
3.0.78 259 12/3/2024
3.0.77 239 12/3/2024
3.0.76 208 12/3/2024
3.0.75 116 12/3/2024
3.0.74 183 12/3/2024
3.0.73 119 12/3/2024
3.0.72 481 12/2/2024
3.0.71 201 12/2/2024
3.0.70 204 12/2/2024
3.0.69 116 12/2/2024
3.0.68 230 12/2/2024
3.0.67 297 12/1/2024
3.0.66 140 12/1/2024
3.0.65 327 12/1/2024
3.0.64 170 12/1/2024
3.0.63 279 11/29/2024
3.0.62 238 11/29/2024
3.0.61 346 11/21/2024
3.0.60 145 11/21/2024
3.0.59 336 11/20/2024
3.0.58 117 11/20/2024
3.0.57 155 11/20/2024
3.0.56 132 11/20/2024
3.0.55 121 11/20/2024
3.0.54 153 11/20/2024
3.0.53 127 11/19/2024
3.0.52 115 11/19/2024
3.0.51 118 11/19/2024
3.0.50 461 11/19/2024
3.0.49 118 11/19/2024
3.0.48 406 11/19/2024
3.0.47 112 11/19/2024
3.0.46 117 11/19/2024
3.0.45 407 11/15/2024
3.0.44 187 11/14/2024
3.0.43 127 11/14/2024
3.0.42 120 11/14/2024
3.0.41 190 11/14/2024
3.0.40 134 11/14/2024
3.0.39 297 11/14/2024
3.0.38 415 11/14/2024
3.0.37 210 11/14/2024
3.0.36 126 11/14/2024
3.0.35 113 11/14/2024
3.0.34 186 11/14/2024
3.0.33 131 11/14/2024
3.0.32 257 11/14/2024
2.1.31 382 11/13/2024
2.1.30 242 11/13/2024
2.1.29 330 11/13/2024
2.1.28 190 11/12/2024
2.1.27 109 11/12/2024
2.1.26 756 11/9/2024
2.1.25 230 11/9/2024
2.1.24 475 11/8/2024
2.1.23 138 11/8/2024
2.1.22 118 11/8/2024
2.1.21 375 11/8/2024
2.1.20 288 11/8/2024
2.1.19 360 11/6/2024
2.1.18 424 11/1/2024
2.1.17 128 11/1/2024
2.1.16 431 11/1/2024
2.1.14 130 10/29/2024
2.1.13 326 10/29/2024
2.1.12 186 10/29/2024
2.1.11 542 10/29/2024
2.1.10 328 10/28/2024
2.1.9 114 10/28/2024
2.1.8 160 10/28/2024
2.1.7 416 10/26/2024
2.1.6 155 10/26/2024
2.1.5 325 10/22/2024
2.1.4 137 10/22/2024
2.1.3 122 10/22/2024
2.1.2 133 10/22/2024
2.1.1 162 10/22/2024