Soenneker.Utils.RateLimiting.Executor 3.0.437

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.437
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 3.0.437
                    
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.437" />
                    
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.437" />
                    
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.437
                    
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 3.0.437"
                    
#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.437
                    
#: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.437
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.437
                    
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 210 9/9/2025
3.0.437 353 9/3/2025
3.0.436 143 9/3/2025
3.0.435 138 9/3/2025
3.0.434 134 9/3/2025
3.0.433 443 8/11/2025
3.0.432 186 8/11/2025
3.0.431 129 8/11/2025
3.0.430 128 8/11/2025
3.0.429 421 8/5/2025
3.0.428 649 7/9/2025
3.0.427 357 7/4/2025
3.0.426 269 7/3/2025
3.0.425 308 6/28/2025
3.0.424 155 6/27/2025
3.0.423 69 6/27/2025
3.0.422 82 6/27/2025
3.0.421 723 6/11/2025
3.0.420 467 6/3/2025
3.0.419 364 5/27/2025
3.0.418 157 5/27/2025
3.0.417 231 5/27/2025
3.0.416 479 5/23/2025
3.0.415 155 5/23/2025
3.0.414 170 5/22/2025
3.0.413 709 5/8/2025
3.0.412 174 5/7/2025
3.0.411 162 5/7/2025
3.0.410 441 5/5/2025
3.0.409 253 5/5/2025
3.0.408 149 5/5/2025
3.0.407 215 5/5/2025
3.0.406 172 5/5/2025
3.0.405 795 4/8/2025
3.0.404 182 4/8/2025
3.0.403 170 4/8/2025
3.0.402 439 4/8/2025
3.0.401 194 4/8/2025
3.0.400 186 4/8/2025
3.0.399 198 4/8/2025
3.0.398 180 4/8/2025
3.0.397 504 4/7/2025
3.0.396 192 4/7/2025
3.0.395 230 4/7/2025
3.0.394 334 4/7/2025
3.0.393 189 4/7/2025
3.0.392 200 4/7/2025
3.0.391 177 4/6/2025
3.0.390 180 4/6/2025
3.0.389 163 4/6/2025
3.0.388 153 4/6/2025
3.0.387 132 4/6/2025
3.0.386 127 4/6/2025
3.0.385 125 4/6/2025
3.0.384 125 4/6/2025
3.0.383 124 4/5/2025
3.0.382 111 4/5/2025
3.0.381 88 4/5/2025
3.0.380 115 4/5/2025
3.0.379 111 4/5/2025
3.0.378 102 4/5/2025
3.0.377 96 4/5/2025
3.0.376 136 4/4/2025
3.0.375 118 4/4/2025
3.0.374 1,378 4/3/2025
3.0.373 283 4/1/2025
3.0.372 214 4/1/2025
3.0.371 244 4/1/2025
3.0.370 220 3/31/2025
3.0.369 167 3/31/2025
3.0.368 244 3/31/2025
3.0.367 319 3/31/2025
3.0.366 195 3/29/2025
3.0.365 103 3/29/2025
3.0.364 134 3/29/2025
3.0.363 691 3/25/2025
3.0.362 519 3/25/2025
3.0.361 332 3/21/2025
3.0.360 178 3/21/2025
3.0.359 429 3/18/2025
3.0.358 256 3/18/2025
3.0.357 234 3/15/2025
3.0.356 79 3/15/2025
3.0.355 440 3/12/2025
3.0.354 206 3/12/2025
3.0.353 265 3/12/2025
3.0.352 192 3/11/2025
3.0.351 340 3/11/2025
3.0.350 247 3/11/2025
3.0.349 166 3/11/2025
3.0.348 439 3/11/2025
3.0.347 392 3/7/2025
3.0.346 359 3/7/2025
3.0.345 347 3/2/2025
3.0.344 161 3/2/2025
3.0.343 173 3/2/2025
3.0.342 110 3/2/2025
3.0.341 127 3/2/2025
3.0.340 234 3/2/2025
3.0.339 221 3/1/2025
3.0.338 113 3/1/2025
3.0.337 113 3/1/2025
3.0.336 427 3/1/2025
3.0.335 137 3/1/2025
3.0.334 98 3/1/2025
3.0.333 208 3/1/2025
3.0.332 106 3/1/2025
3.0.331 104 3/1/2025
3.0.330 332 2/25/2025
3.0.329 160 2/25/2025
3.0.328 200 2/25/2025
3.0.327 229 2/25/2025
3.0.326 168 2/25/2025
3.0.325 407 2/23/2025
3.0.324 172 2/23/2025
3.0.323 109 2/22/2025
3.0.322 379 2/22/2025
3.0.321 213 2/22/2025
3.0.320 147 2/22/2025
3.0.319 217 2/22/2025
3.0.318 114 2/21/2025
3.0.317 237 2/21/2025
3.0.316 284 2/21/2025
3.0.315 344 2/19/2025
3.0.314 153 2/19/2025
3.0.313 150 2/19/2025
3.0.312 121 2/18/2025
3.0.311 333 2/18/2025
3.0.310 188 2/18/2025
3.0.309 119 2/18/2025
3.0.308 468 2/14/2025
3.0.307 112 2/14/2025
3.0.306 210 2/13/2025
3.0.305 427 2/12/2025
3.0.304 137 2/12/2025
3.0.303 211 2/12/2025
3.0.302 222 2/11/2025
3.0.301 200 2/11/2025
3.0.300 326 2/11/2025
3.0.299 273 2/11/2025
3.0.298 121 2/11/2025
3.0.297 203 2/11/2025
3.0.296 211 2/10/2025
3.0.295 167 2/10/2025
3.0.294 216 2/10/2025
3.0.293 120 2/10/2025
3.0.292 114 2/10/2025
3.0.291 402 2/9/2025
3.0.290 132 2/8/2025
3.0.289 105 2/8/2025
3.0.288 110 2/8/2025
3.0.287 123 2/8/2025
3.0.286 345 2/8/2025
3.0.285 137 2/7/2025
3.0.284 165 2/7/2025
3.0.283 269 2/7/2025
3.0.282 107 2/7/2025
3.0.281 114 2/7/2025
3.0.280 108 2/7/2025
3.0.279 160 2/7/2025
3.0.278 112 2/7/2025
3.0.277 124 2/7/2025
3.0.276 403 2/6/2025
3.0.275 274 2/5/2025
3.0.274 178 2/5/2025
3.0.273 116 2/5/2025
3.0.272 135 2/5/2025
3.0.271 255 2/5/2025
3.0.270 125 2/5/2025
3.0.269 110 2/5/2025
3.0.268 530 1/28/2025
3.0.267 116 1/28/2025
3.0.266 118 1/28/2025
3.0.265 340 1/27/2025
3.0.264 131 1/27/2025
3.0.263 109 1/27/2025
3.0.262 101 1/27/2025
3.0.261 168 1/27/2025
3.0.260 125 1/27/2025
3.0.259 295 1/26/2025
3.0.258 120 1/26/2025
3.0.257 123 1/26/2025
3.0.256 97 1/26/2025
3.0.255 202 1/25/2025
3.0.254 228 1/25/2025
3.0.253 100 1/25/2025
3.0.252 113 1/25/2025
3.0.251 107 1/25/2025
3.0.250 209 1/25/2025
3.0.249 404 1/24/2025
3.0.248 149 1/24/2025
3.0.247 217 1/24/2025
3.0.246 178 1/24/2025
3.0.245 281 1/24/2025
3.0.244 215 1/23/2025
3.0.243 281 1/21/2025
3.0.242 118 1/21/2025
3.0.241 194 1/21/2025
3.0.240 120 1/21/2025
3.0.239 111 1/21/2025
3.0.238 308 1/21/2025
3.0.237 109 1/21/2025
3.0.236 108 1/21/2025
3.0.235 104 1/21/2025
3.0.234 113 1/21/2025
3.0.233 100 1/20/2025
3.0.232 126 1/20/2025
3.0.231 595 1/20/2025
3.0.230 110 1/20/2025
3.0.229 107 1/20/2025
3.0.228 251 1/20/2025
3.0.227 1,837 1/14/2025
3.0.226 89 1/14/2025
3.0.225 93 1/14/2025
3.0.224 165 1/14/2025
3.0.223 213 1/13/2025
3.0.222 194 1/13/2025
3.0.221 146 1/13/2025
3.0.220 105 1/13/2025
3.0.219 96 1/13/2025
3.0.218 244 1/12/2025
3.0.217 182 1/11/2025
3.0.216 157 1/11/2025
3.0.215 162 1/11/2025
3.0.214 119 1/11/2025
3.0.213 150 1/10/2025
3.0.212 118 1/10/2025
3.0.211 100 1/10/2025
3.0.210 113 1/10/2025
3.0.209 259 1/10/2025
3.0.208 117 1/10/2025
3.0.207 124 1/10/2025
3.0.206 656 1/3/2025
3.0.205 141 1/3/2025
3.0.204 177 1/3/2025
3.0.203 144 1/3/2025
3.0.202 221 1/2/2025
3.0.201 117 1/2/2025
3.0.200 115 1/2/2025
3.0.199 203 1/2/2025
3.0.198 118 1/2/2025
3.0.197 108 1/2/2025
3.0.196 429 1/1/2025
3.0.195 203 1/1/2025
3.0.194 130 1/1/2025
3.0.193 146 1/1/2025
3.0.192 234 1/1/2025
3.0.191 121 1/1/2025
3.0.190 125 1/1/2025
3.0.189 134 12/31/2024
3.0.188 119 12/31/2024
3.0.187 115 12/31/2024
3.0.186 126 12/31/2024
3.0.185 126 12/31/2024
3.0.184 177 12/31/2024
3.0.183 130 12/31/2024
3.0.182 417 12/31/2024
3.0.181 112 12/31/2024
3.0.180 275 12/31/2024
3.0.179 185 12/31/2024
3.0.178 119 12/31/2024
3.0.177 125 12/31/2024
3.0.176 121 12/31/2024
3.0.175 110 12/31/2024
3.0.174 135 12/30/2024
3.0.173 374 12/28/2024
3.0.172 132 12/28/2024
3.0.171 180 12/27/2024
3.0.170 109 12/27/2024
3.0.169 450 12/24/2024
3.0.168 220 12/24/2024
3.0.167 145 12/24/2024
3.0.166 114 12/24/2024
3.0.165 198 12/24/2024
3.0.164 101 12/24/2024
3.0.163 211 12/24/2024
3.0.162 96 12/24/2024
3.0.161 155 12/24/2024
3.0.160 122 12/23/2024
3.0.159 171 12/23/2024
3.0.158 196 12/23/2024
3.0.157 118 12/23/2024
3.0.156 290 12/23/2024
3.0.155 126 12/23/2024
3.0.154 281 12/22/2024
3.0.153 111 12/22/2024
3.0.152 122 12/22/2024
3.0.151 219 12/22/2024
3.0.150 122 12/22/2024
3.0.149 118 12/22/2024
3.0.148 112 12/22/2024
3.0.147 293 12/22/2024
3.0.146 112 12/22/2024
3.0.145 127 12/22/2024
3.0.144 129 12/22/2024
3.0.143 284 12/21/2024
3.0.142 118 12/21/2024
3.0.141 121 12/21/2024
3.0.140 111 12/21/2024
3.0.139 120 12/21/2024
3.0.138 115 12/21/2024
3.0.137 110 12/21/2024
3.0.136 116 12/21/2024
3.0.135 296 12/21/2024
3.0.134 211 12/21/2024
3.0.133 112 12/21/2024
3.0.132 120 12/21/2024
3.0.131 109 12/21/2024
3.0.130 254 12/21/2024
3.0.129 118 12/21/2024
3.0.128 173 12/20/2024
3.0.127 116 12/20/2024
3.0.126 196 12/20/2024
3.0.125 120 12/20/2024
3.0.124 221 12/20/2024
3.0.123 195 12/20/2024
3.0.122 129 12/20/2024
3.0.121 192 12/20/2024
3.0.120 219 12/19/2024
3.0.119 200 12/19/2024
3.0.118 116 12/19/2024
3.0.117 171 12/19/2024
3.0.116 107 12/18/2024
3.0.115 160 12/18/2024
3.0.114 231 12/17/2024
3.0.113 130 12/17/2024
3.0.112 102 12/17/2024
3.0.111 239 12/16/2024
3.0.110 324 12/10/2024
3.0.109 124 12/10/2024
3.0.108 188 12/10/2024
3.0.107 116 12/9/2024
3.0.106 195 12/9/2024
3.0.105 244 12/9/2024
3.0.104 116 12/9/2024
3.0.103 317 12/7/2024
3.0.102 141 12/6/2024
3.0.101 135 12/6/2024
3.0.100 133 12/6/2024
3.0.99 146 12/6/2024
3.0.97 165 12/6/2024
3.0.96 148 12/6/2024
3.0.95 129 12/6/2024
3.0.94 127 12/6/2024
3.0.93 121 12/6/2024
3.0.92 123 12/6/2024
3.0.91 159 12/6/2024
3.0.90 140 12/5/2024
3.0.89 147 12/5/2024
3.0.88 698 12/5/2024
3.0.87 165 12/5/2024
3.0.86 162 12/5/2024
3.0.85 209 12/5/2024
3.0.84 150 12/4/2024
3.0.83 169 12/4/2024
3.0.82 221 12/4/2024
3.0.81 224 12/4/2024
3.0.80 188 12/4/2024
3.0.79 122 12/3/2024
3.0.78 225 12/3/2024
3.0.77 207 12/3/2024
3.0.76 183 12/3/2024
3.0.75 115 12/3/2024
3.0.74 157 12/3/2024
3.0.73 115 12/3/2024
3.0.72 387 12/2/2024
3.0.71 176 12/2/2024
3.0.70 184 12/2/2024
3.0.69 116 12/2/2024
3.0.68 197 12/2/2024
3.0.67 244 12/1/2024
3.0.66 134 12/1/2024
3.0.65 274 12/1/2024
3.0.64 160 12/1/2024
3.0.63 234 11/29/2024
3.0.62 201 11/29/2024
3.0.61 279 11/21/2024
3.0.60 138 11/21/2024
3.0.59 283 11/20/2024
3.0.58 117 11/20/2024
3.0.57 147 11/20/2024
3.0.56 128 11/20/2024
3.0.55 118 11/20/2024
3.0.54 147 11/20/2024
3.0.53 124 11/19/2024
3.0.52 115 11/19/2024
3.0.51 114 11/19/2024
3.0.50 401 11/19/2024
3.0.49 115 11/19/2024
3.0.48 337 11/19/2024
3.0.47 112 11/19/2024
3.0.46 117 11/19/2024
3.0.45 327 11/15/2024
3.0.44 165 11/14/2024
3.0.43 125 11/14/2024
3.0.42 120 11/14/2024
3.0.41 165 11/14/2024
3.0.40 128 11/14/2024
3.0.39 242 11/14/2024
3.0.38 333 11/14/2024
3.0.37 183 11/14/2024
3.0.36 124 11/14/2024
3.0.35 113 11/14/2024
3.0.34 170 11/14/2024
3.0.33 130 11/14/2024
3.0.32 215 11/14/2024
2.1.31 321 11/13/2024
2.1.30 212 11/13/2024
2.1.29 280 11/13/2024
2.1.28 172 11/12/2024
2.1.27 109 11/12/2024
2.1.26 665 11/9/2024
2.1.25 210 11/9/2024
2.1.24 375 11/8/2024
2.1.23 134 11/8/2024
2.1.22 118 11/8/2024
2.1.21 312 11/8/2024
2.1.20 255 11/8/2024
2.1.19 292 11/6/2024
2.1.18 364 11/1/2024
2.1.17 128 11/1/2024
2.1.16 364 11/1/2024
2.1.14 130 10/29/2024
2.1.13 275 10/29/2024
2.1.12 171 10/29/2024
2.1.11 443 10/29/2024
2.1.10 281 10/28/2024
2.1.9 114 10/28/2024
2.1.8 154 10/28/2024
2.1.7 372 10/26/2024
2.1.6 151 10/26/2024
2.1.5 288 10/22/2024
2.1.4 133 10/22/2024
2.1.3 119 10/22/2024
2.1.2 129 10/22/2024
2.1.1 151 10/22/2024