Soenneker.Utils.RateLimiting.Executor 3.0.433

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.433
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 3.0.433
                    
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.433" />
                    
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.433" />
                    
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.433
                    
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 3.0.433"
                    
#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.433
                    
#: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.433
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.433
                    
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 276 9/9/2025
3.0.437 485 9/3/2025
3.0.436 154 9/3/2025
3.0.435 149 9/3/2025
3.0.434 145 9/3/2025
3.0.433 597 8/11/2025
3.0.432 223 8/11/2025
3.0.431 130 8/11/2025
3.0.430 139 8/11/2025
3.0.429 531 8/5/2025
3.0.428 724 7/9/2025
3.0.427 408 7/4/2025
3.0.426 280 7/3/2025
3.0.425 325 6/28/2025
3.0.424 170 6/27/2025
3.0.423 69 6/27/2025
3.0.422 82 6/27/2025
3.0.421 774 6/11/2025
3.0.420 505 6/3/2025
3.0.419 394 5/27/2025
3.0.418 161 5/27/2025
3.0.417 249 5/27/2025
3.0.416 557 5/23/2025
3.0.415 157 5/23/2025
3.0.414 170 5/22/2025
3.0.413 838 5/8/2025
3.0.412 176 5/7/2025
3.0.411 165 5/7/2025
3.0.410 498 5/5/2025
3.0.409 278 5/5/2025
3.0.408 149 5/5/2025
3.0.407 231 5/5/2025
3.0.406 175 5/5/2025
3.0.405 865 4/8/2025
3.0.404 182 4/8/2025
3.0.403 170 4/8/2025
3.0.402 492 4/8/2025
3.0.401 195 4/8/2025
3.0.400 187 4/8/2025
3.0.399 202 4/8/2025
3.0.398 180 4/8/2025
3.0.397 589 4/7/2025
3.0.396 194 4/7/2025
3.0.395 236 4/7/2025
3.0.394 375 4/7/2025
3.0.393 190 4/7/2025
3.0.392 201 4/7/2025
3.0.391 178 4/6/2025
3.0.390 182 4/6/2025
3.0.389 164 4/6/2025
3.0.388 155 4/6/2025
3.0.387 132 4/6/2025
3.0.386 129 4/6/2025
3.0.385 127 4/6/2025
3.0.384 127 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 116 4/5/2025
3.0.379 113 4/5/2025
3.0.378 103 4/5/2025
3.0.377 96 4/5/2025
3.0.376 139 4/4/2025
3.0.375 123 4/4/2025
3.0.374 1,619 4/3/2025
3.0.373 312 4/1/2025
3.0.372 226 4/1/2025
3.0.371 269 4/1/2025
3.0.370 230 3/31/2025
3.0.369 167 3/31/2025
3.0.368 261 3/31/2025
3.0.367 352 3/31/2025
3.0.366 226 3/29/2025
3.0.365 104 3/29/2025
3.0.364 141 3/29/2025
3.0.363 742 3/25/2025
3.0.362 525 3/25/2025
3.0.361 386 3/21/2025
3.0.360 184 3/21/2025
3.0.359 509 3/18/2025
3.0.358 288 3/18/2025
3.0.357 286 3/15/2025
3.0.356 79 3/15/2025
3.0.355 516 3/12/2025
3.0.354 213 3/12/2025
3.0.353 295 3/12/2025
3.0.352 193 3/11/2025
3.0.351 369 3/11/2025
3.0.350 262 3/11/2025
3.0.349 166 3/11/2025
3.0.348 500 3/11/2025
3.0.347 435 3/7/2025
3.0.346 398 3/7/2025
3.0.345 382 3/2/2025
3.0.344 179 3/2/2025
3.0.343 180 3/2/2025
3.0.342 110 3/2/2025
3.0.341 128 3/2/2025
3.0.340 256 3/2/2025
3.0.339 257 3/1/2025
3.0.338 114 3/1/2025
3.0.337 113 3/1/2025
3.0.336 519 3/1/2025
3.0.335 138 3/1/2025
3.0.334 102 3/1/2025
3.0.333 232 3/1/2025
3.0.332 107 3/1/2025
3.0.331 104 3/1/2025
3.0.330 385 2/25/2025
3.0.329 170 2/25/2025
3.0.328 220 2/25/2025
3.0.327 261 2/25/2025
3.0.326 186 2/25/2025
3.0.325 480 2/23/2025
3.0.324 188 2/23/2025
3.0.323 111 2/22/2025
3.0.322 435 2/22/2025
3.0.321 228 2/22/2025
3.0.320 156 2/22/2025
3.0.319 245 2/22/2025
3.0.318 118 2/21/2025
3.0.317 256 2/21/2025
3.0.316 319 2/21/2025
3.0.315 403 2/19/2025
3.0.314 158 2/19/2025
3.0.313 155 2/19/2025
3.0.312 121 2/18/2025
3.0.311 369 2/18/2025
3.0.310 206 2/18/2025
3.0.309 121 2/18/2025
3.0.308 531 2/14/2025
3.0.307 113 2/14/2025
3.0.306 223 2/13/2025
3.0.305 475 2/12/2025
3.0.304 139 2/12/2025
3.0.303 229 2/12/2025
3.0.302 233 2/11/2025
3.0.301 209 2/11/2025
3.0.300 385 2/11/2025
3.0.299 297 2/11/2025
3.0.298 123 2/11/2025
3.0.297 225 2/11/2025
3.0.296 229 2/10/2025
3.0.295 167 2/10/2025
3.0.294 244 2/10/2025
3.0.293 122 2/10/2025
3.0.292 114 2/10/2025
3.0.291 456 2/9/2025
3.0.290 134 2/8/2025
3.0.289 106 2/8/2025
3.0.288 113 2/8/2025
3.0.287 124 2/8/2025
3.0.286 410 2/8/2025
3.0.285 138 2/7/2025
3.0.284 171 2/7/2025
3.0.283 289 2/7/2025
3.0.282 107 2/7/2025
3.0.281 116 2/7/2025
3.0.280 110 2/7/2025
3.0.279 162 2/7/2025
3.0.278 113 2/7/2025
3.0.277 125 2/7/2025
3.0.276 463 2/6/2025
3.0.275 315 2/5/2025
3.0.274 190 2/5/2025
3.0.273 117 2/5/2025
3.0.272 136 2/5/2025
3.0.271 296 2/5/2025
3.0.270 127 2/5/2025
3.0.269 110 2/5/2025
3.0.268 614 1/28/2025
3.0.267 117 1/28/2025
3.0.266 118 1/28/2025
3.0.265 430 1/27/2025
3.0.264 132 1/27/2025
3.0.263 109 1/27/2025
3.0.262 102 1/27/2025
3.0.261 183 1/27/2025
3.0.260 127 1/27/2025
3.0.259 349 1/26/2025
3.0.258 120 1/26/2025
3.0.257 126 1/26/2025
3.0.256 98 1/26/2025
3.0.255 231 1/25/2025
3.0.254 269 1/25/2025
3.0.253 103 1/25/2025
3.0.252 113 1/25/2025
3.0.251 107 1/25/2025
3.0.250 242 1/25/2025
3.0.249 507 1/24/2025
3.0.248 163 1/24/2025
3.0.247 250 1/24/2025
3.0.246 201 1/24/2025
3.0.245 319 1/24/2025
3.0.244 227 1/23/2025
3.0.243 339 1/21/2025
3.0.242 118 1/21/2025
3.0.241 214 1/21/2025
3.0.240 120 1/21/2025
3.0.239 112 1/21/2025
3.0.238 369 1/21/2025
3.0.237 109 1/21/2025
3.0.236 110 1/21/2025
3.0.235 106 1/21/2025
3.0.234 113 1/21/2025
3.0.233 100 1/20/2025
3.0.232 128 1/20/2025
3.0.231 756 1/20/2025
3.0.230 110 1/20/2025
3.0.229 108 1/20/2025
3.0.228 295 1/20/2025
3.0.227 2,437 1/14/2025
3.0.226 90 1/14/2025
3.0.225 93 1/14/2025
3.0.224 201 1/14/2025
3.0.223 254 1/13/2025
3.0.222 232 1/13/2025
3.0.221 166 1/13/2025
3.0.220 108 1/13/2025
3.0.219 96 1/13/2025
3.0.218 289 1/12/2025
3.0.217 205 1/11/2025
3.0.216 170 1/11/2025
3.0.215 175 1/11/2025
3.0.214 122 1/11/2025
3.0.213 167 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 313 1/10/2025
3.0.208 119 1/10/2025
3.0.207 124 1/10/2025
3.0.206 744 1/3/2025
3.0.205 143 1/3/2025
3.0.204 193 1/3/2025
3.0.203 145 1/3/2025
3.0.202 246 1/2/2025
3.0.201 120 1/2/2025
3.0.200 118 1/2/2025
3.0.199 227 1/2/2025
3.0.198 119 1/2/2025
3.0.197 109 1/2/2025
3.0.196 517 1/1/2025
3.0.195 215 1/1/2025
3.0.194 131 1/1/2025
3.0.193 149 1/1/2025
3.0.192 255 1/1/2025
3.0.191 121 1/1/2025
3.0.190 126 1/1/2025
3.0.189 136 12/31/2024
3.0.188 121 12/31/2024
3.0.187 115 12/31/2024
3.0.186 127 12/31/2024
3.0.185 127 12/31/2024
3.0.184 188 12/31/2024
3.0.183 131 12/31/2024
3.0.182 513 12/31/2024
3.0.181 115 12/31/2024
3.0.180 326 12/31/2024
3.0.179 203 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 110 12/31/2024
3.0.174 135 12/30/2024
3.0.173 465 12/28/2024
3.0.172 132 12/28/2024
3.0.171 189 12/27/2024
3.0.170 109 12/27/2024
3.0.169 571 12/24/2024
3.0.168 246 12/24/2024
3.0.167 153 12/24/2024
3.0.166 114 12/24/2024
3.0.165 216 12/24/2024
3.0.164 101 12/24/2024
3.0.163 237 12/24/2024
3.0.162 96 12/24/2024
3.0.161 159 12/24/2024
3.0.160 124 12/23/2024
3.0.159 182 12/23/2024
3.0.158 215 12/23/2024
3.0.157 121 12/23/2024
3.0.156 348 12/23/2024
3.0.155 132 12/23/2024
3.0.154 334 12/22/2024
3.0.153 111 12/22/2024
3.0.152 124 12/22/2024
3.0.151 248 12/22/2024
3.0.150 123 12/22/2024
3.0.149 118 12/22/2024
3.0.148 115 12/22/2024
3.0.147 350 12/22/2024
3.0.146 112 12/22/2024
3.0.145 128 12/22/2024
3.0.144 130 12/22/2024
3.0.143 332 12/21/2024
3.0.142 120 12/21/2024
3.0.141 121 12/21/2024
3.0.140 114 12/21/2024
3.0.139 120 12/21/2024
3.0.138 116 12/21/2024
3.0.137 110 12/21/2024
3.0.136 118 12/21/2024
3.0.135 361 12/21/2024
3.0.134 226 12/21/2024
3.0.133 113 12/21/2024
3.0.132 121 12/21/2024
3.0.131 112 12/21/2024
3.0.130 301 12/21/2024
3.0.129 122 12/21/2024
3.0.128 178 12/20/2024
3.0.127 116 12/20/2024
3.0.126 221 12/20/2024
3.0.125 121 12/20/2024
3.0.124 242 12/20/2024
3.0.123 224 12/20/2024
3.0.122 129 12/20/2024
3.0.121 214 12/20/2024
3.0.120 244 12/19/2024
3.0.119 223 12/19/2024
3.0.118 116 12/19/2024
3.0.117 186 12/19/2024
3.0.116 107 12/18/2024
3.0.115 167 12/18/2024
3.0.114 254 12/17/2024
3.0.113 137 12/17/2024
3.0.112 102 12/17/2024
3.0.111 265 12/16/2024
3.0.110 368 12/10/2024
3.0.109 124 12/10/2024
3.0.108 210 12/10/2024
3.0.107 117 12/9/2024
3.0.106 210 12/9/2024
3.0.105 276 12/9/2024
3.0.104 117 12/9/2024
3.0.103 375 12/7/2024
3.0.102 142 12/6/2024
3.0.101 137 12/6/2024
3.0.100 134 12/6/2024
3.0.99 148 12/6/2024
3.0.97 165 12/6/2024
3.0.96 150 12/6/2024
3.0.95 129 12/6/2024
3.0.94 128 12/6/2024
3.0.93 121 12/6/2024
3.0.92 124 12/6/2024
3.0.91 162 12/6/2024
3.0.90 140 12/5/2024
3.0.89 147 12/5/2024
3.0.88 883 12/5/2024
3.0.87 172 12/5/2024
3.0.86 168 12/5/2024
3.0.85 231 12/5/2024
3.0.84 152 12/4/2024
3.0.83 188 12/4/2024
3.0.82 251 12/4/2024
3.0.81 233 12/4/2024
3.0.80 203 12/4/2024
3.0.79 124 12/3/2024
3.0.78 252 12/3/2024
3.0.77 219 12/3/2024
3.0.76 198 12/3/2024
3.0.75 116 12/3/2024
3.0.74 174 12/3/2024
3.0.73 118 12/3/2024
3.0.72 469 12/2/2024
3.0.71 194 12/2/2024
3.0.70 195 12/2/2024
3.0.69 116 12/2/2024
3.0.68 221 12/2/2024
3.0.67 284 12/1/2024
3.0.66 138 12/1/2024
3.0.65 311 12/1/2024
3.0.64 164 12/1/2024
3.0.63 270 11/29/2024
3.0.62 229 11/29/2024
3.0.61 326 11/21/2024
3.0.60 138 11/21/2024
3.0.59 324 11/20/2024
3.0.58 117 11/20/2024
3.0.57 148 11/20/2024
3.0.56 128 11/20/2024
3.0.55 118 11/20/2024
3.0.54 148 11/20/2024
3.0.53 124 11/19/2024
3.0.52 115 11/19/2024
3.0.51 117 11/19/2024
3.0.50 452 11/19/2024
3.0.49 117 11/19/2024
3.0.48 394 11/19/2024
3.0.47 112 11/19/2024
3.0.46 117 11/19/2024
3.0.45 396 11/15/2024
3.0.44 178 11/14/2024
3.0.43 125 11/14/2024
3.0.42 120 11/14/2024
3.0.41 183 11/14/2024
3.0.40 128 11/14/2024
3.0.39 281 11/14/2024
3.0.38 400 11/14/2024
3.0.37 207 11/14/2024
3.0.36 125 11/14/2024
3.0.35 113 11/14/2024
3.0.34 178 11/14/2024
3.0.33 130 11/14/2024
3.0.32 250 11/14/2024
2.1.31 373 11/13/2024
2.1.30 225 11/13/2024
2.1.29 322 11/13/2024
2.1.28 182 11/12/2024
2.1.27 109 11/12/2024
2.1.26 745 11/9/2024
2.1.25 220 11/9/2024
2.1.24 456 11/8/2024
2.1.23 137 11/8/2024
2.1.22 118 11/8/2024
2.1.21 356 11/8/2024
2.1.20 272 11/8/2024
2.1.19 354 11/6/2024
2.1.18 415 11/1/2024
2.1.17 128 11/1/2024
2.1.16 405 11/1/2024
2.1.14 130 10/29/2024
2.1.13 318 10/29/2024
2.1.12 171 10/29/2024
2.1.11 534 10/29/2024
2.1.10 317 10/28/2024
2.1.9 114 10/28/2024
2.1.8 156 10/28/2024
2.1.7 400 10/26/2024
2.1.6 154 10/26/2024
2.1.5 321 10/22/2024
2.1.4 133 10/22/2024
2.1.3 121 10/22/2024
2.1.2 131 10/22/2024
2.1.1 153 10/22/2024