Soenneker.Utils.RateLimiting.Executor 3.0.436

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.436
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 3.0.436
                    
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.436" />
                    
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.436" />
                    
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.436
                    
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 3.0.436"
                    
#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.436
                    
#: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.436
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.436
                    
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 160 9/9/2025
3.0.437 348 9/3/2025
3.0.436 142 9/3/2025
3.0.435 137 9/3/2025
3.0.434 133 9/3/2025
3.0.433 442 8/11/2025
3.0.432 185 8/11/2025
3.0.431 127 8/11/2025
3.0.430 127 8/11/2025
3.0.429 418 8/5/2025
3.0.428 598 7/9/2025
3.0.427 356 7/4/2025
3.0.426 268 7/3/2025
3.0.425 307 6/28/2025
3.0.424 154 6/27/2025
3.0.423 68 6/27/2025
3.0.422 81 6/27/2025
3.0.421 720 6/11/2025
3.0.420 464 6/3/2025
3.0.419 361 5/27/2025
3.0.418 156 5/27/2025
3.0.417 228 5/27/2025
3.0.416 477 5/23/2025
3.0.415 153 5/23/2025
3.0.414 168 5/22/2025
3.0.413 707 5/8/2025
3.0.412 171 5/7/2025
3.0.411 161 5/7/2025
3.0.410 440 5/5/2025
3.0.409 250 5/5/2025
3.0.408 148 5/5/2025
3.0.407 213 5/5/2025
3.0.406 167 5/5/2025
3.0.405 794 4/8/2025
3.0.404 181 4/8/2025
3.0.403 170 4/8/2025
3.0.402 437 4/8/2025
3.0.401 192 4/8/2025
3.0.400 184 4/8/2025
3.0.399 195 4/8/2025
3.0.398 178 4/8/2025
3.0.397 502 4/7/2025
3.0.396 190 4/7/2025
3.0.395 230 4/7/2025
3.0.394 334 4/7/2025
3.0.393 188 4/7/2025
3.0.392 197 4/7/2025
3.0.391 176 4/6/2025
3.0.390 178 4/6/2025
3.0.389 159 4/6/2025
3.0.388 149 4/6/2025
3.0.387 130 4/6/2025
3.0.386 126 4/6/2025
3.0.385 124 4/6/2025
3.0.384 123 4/6/2025
3.0.383 124 4/5/2025
3.0.382 110 4/5/2025
3.0.381 88 4/5/2025
3.0.380 114 4/5/2025
3.0.379 110 4/5/2025
3.0.378 102 4/5/2025
3.0.377 96 4/5/2025
3.0.376 135 4/4/2025
3.0.375 114 4/4/2025
3.0.374 1,376 4/3/2025
3.0.373 281 4/1/2025
3.0.372 210 4/1/2025
3.0.371 243 4/1/2025
3.0.370 217 3/31/2025
3.0.369 167 3/31/2025
3.0.368 243 3/31/2025
3.0.367 318 3/31/2025
3.0.366 194 3/29/2025
3.0.365 101 3/29/2025
3.0.364 133 3/29/2025
3.0.363 687 3/25/2025
3.0.362 518 3/25/2025
3.0.361 328 3/21/2025
3.0.360 178 3/21/2025
3.0.359 429 3/18/2025
3.0.358 255 3/18/2025
3.0.357 230 3/15/2025
3.0.356 78 3/15/2025
3.0.355 438 3/12/2025
3.0.354 203 3/12/2025
3.0.353 263 3/12/2025
3.0.352 191 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 436 3/11/2025
3.0.347 392 3/7/2025
3.0.346 356 3/7/2025
3.0.345 344 3/2/2025
3.0.344 160 3/2/2025
3.0.343 170 3/2/2025
3.0.342 107 3/2/2025
3.0.341 125 3/2/2025
3.0.340 230 3/2/2025
3.0.339 221 3/1/2025
3.0.338 110 3/1/2025
3.0.337 113 3/1/2025
3.0.336 427 3/1/2025
3.0.335 135 3/1/2025
3.0.334 96 3/1/2025
3.0.333 208 3/1/2025
3.0.332 103 3/1/2025
3.0.331 101 3/1/2025
3.0.330 330 2/25/2025
3.0.329 159 2/25/2025
3.0.328 199 2/25/2025
3.0.327 225 2/25/2025
3.0.326 167 2/25/2025
3.0.325 405 2/23/2025
3.0.324 170 2/23/2025
3.0.323 108 2/22/2025
3.0.322 378 2/22/2025
3.0.321 210 2/22/2025
3.0.320 146 2/22/2025
3.0.319 214 2/22/2025
3.0.318 112 2/21/2025
3.0.317 236 2/21/2025
3.0.316 284 2/21/2025
3.0.315 342 2/19/2025
3.0.314 149 2/19/2025
3.0.313 149 2/19/2025
3.0.312 121 2/18/2025
3.0.311 331 2/18/2025
3.0.310 183 2/18/2025
3.0.309 117 2/18/2025
3.0.308 468 2/14/2025
3.0.307 111 2/14/2025
3.0.306 208 2/13/2025
3.0.305 424 2/12/2025
3.0.304 137 2/12/2025
3.0.303 209 2/12/2025
3.0.302 219 2/11/2025
3.0.301 200 2/11/2025
3.0.300 325 2/11/2025
3.0.299 272 2/11/2025
3.0.298 121 2/11/2025
3.0.297 202 2/11/2025
3.0.296 211 2/10/2025
3.0.295 166 2/10/2025
3.0.294 214 2/10/2025
3.0.293 116 2/10/2025
3.0.292 113 2/10/2025
3.0.291 400 2/9/2025
3.0.290 130 2/8/2025
3.0.289 103 2/8/2025
3.0.288 108 2/8/2025
3.0.287 120 2/8/2025
3.0.286 340 2/8/2025
3.0.285 134 2/7/2025
3.0.284 164 2/7/2025
3.0.283 269 2/7/2025
3.0.282 107 2/7/2025
3.0.281 110 2/7/2025
3.0.280 105 2/7/2025
3.0.279 157 2/7/2025
3.0.278 112 2/7/2025
3.0.277 124 2/7/2025
3.0.276 399 2/6/2025
3.0.275 271 2/5/2025
3.0.274 178 2/5/2025
3.0.273 115 2/5/2025
3.0.272 131 2/5/2025
3.0.271 255 2/5/2025
3.0.270 124 2/5/2025
3.0.269 110 2/5/2025
3.0.268 529 1/28/2025
3.0.267 114 1/28/2025
3.0.266 117 1/28/2025
3.0.265 338 1/27/2025
3.0.264 129 1/27/2025
3.0.263 106 1/27/2025
3.0.262 98 1/27/2025
3.0.261 166 1/27/2025
3.0.260 124 1/27/2025
3.0.259 294 1/26/2025
3.0.258 120 1/26/2025
3.0.257 122 1/26/2025
3.0.256 96 1/26/2025
3.0.255 198 1/25/2025
3.0.254 227 1/25/2025
3.0.253 100 1/25/2025
3.0.252 112 1/25/2025
3.0.251 105 1/25/2025
3.0.250 209 1/25/2025
3.0.249 401 1/24/2025
3.0.248 147 1/24/2025
3.0.247 217 1/24/2025
3.0.246 173 1/24/2025
3.0.245 279 1/24/2025
3.0.244 214 1/23/2025
3.0.243 280 1/21/2025
3.0.242 118 1/21/2025
3.0.241 188 1/21/2025
3.0.240 118 1/21/2025
3.0.239 110 1/21/2025
3.0.238 305 1/21/2025
3.0.237 107 1/21/2025
3.0.236 106 1/21/2025
3.0.235 102 1/21/2025
3.0.234 111 1/21/2025
3.0.233 100 1/20/2025
3.0.232 124 1/20/2025
3.0.231 590 1/20/2025
3.0.230 110 1/20/2025
3.0.229 105 1/20/2025
3.0.228 251 1/20/2025
3.0.227 1,837 1/14/2025
3.0.226 87 1/14/2025
3.0.225 93 1/14/2025
3.0.224 165 1/14/2025
3.0.223 210 1/13/2025
3.0.222 191 1/13/2025
3.0.221 145 1/13/2025
3.0.220 101 1/13/2025
3.0.219 95 1/13/2025
3.0.218 243 1/12/2025
3.0.217 182 1/11/2025
3.0.216 156 1/11/2025
3.0.215 159 1/11/2025
3.0.214 117 1/11/2025
3.0.213 149 1/10/2025
3.0.212 114 1/10/2025
3.0.211 96 1/10/2025
3.0.210 110 1/10/2025
3.0.209 258 1/10/2025
3.0.208 116 1/10/2025
3.0.207 120 1/10/2025
3.0.206 656 1/3/2025
3.0.205 138 1/3/2025
3.0.204 177 1/3/2025
3.0.203 142 1/3/2025
3.0.202 218 1/2/2025
3.0.201 114 1/2/2025
3.0.200 114 1/2/2025
3.0.199 201 1/2/2025
3.0.198 116 1/2/2025
3.0.197 108 1/2/2025
3.0.196 427 1/1/2025
3.0.195 200 1/1/2025
3.0.194 129 1/1/2025
3.0.193 144 1/1/2025
3.0.192 233 1/1/2025
3.0.191 121 1/1/2025
3.0.190 124 1/1/2025
3.0.189 132 12/31/2024
3.0.188 116 12/31/2024
3.0.187 115 12/31/2024
3.0.186 124 12/31/2024
3.0.185 123 12/31/2024
3.0.184 174 12/31/2024
3.0.183 129 12/31/2024
3.0.182 414 12/31/2024
3.0.181 110 12/31/2024
3.0.180 275 12/31/2024
3.0.179 181 12/31/2024
3.0.178 117 12/31/2024
3.0.177 122 12/31/2024
3.0.176 119 12/31/2024
3.0.175 107 12/31/2024
3.0.174 135 12/30/2024
3.0.173 371 12/28/2024
3.0.172 131 12/28/2024
3.0.171 177 12/27/2024
3.0.170 109 12/27/2024
3.0.169 446 12/24/2024
3.0.168 218 12/24/2024
3.0.167 140 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 207 12/24/2024
3.0.162 96 12/24/2024
3.0.161 152 12/24/2024
3.0.160 120 12/23/2024
3.0.159 170 12/23/2024
3.0.158 195 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 280 12/22/2024
3.0.153 111 12/22/2024
3.0.152 120 12/22/2024
3.0.151 219 12/22/2024
3.0.150 120 12/22/2024
3.0.149 118 12/22/2024
3.0.148 108 12/22/2024
3.0.147 292 12/22/2024
3.0.146 111 12/22/2024
3.0.145 126 12/22/2024
3.0.144 125 12/22/2024
3.0.143 283 12/21/2024
3.0.142 115 12/21/2024
3.0.141 120 12/21/2024
3.0.140 109 12/21/2024
3.0.139 120 12/21/2024
3.0.138 112 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 209 12/21/2024
3.0.133 112 12/21/2024
3.0.132 116 12/21/2024
3.0.131 107 12/21/2024
3.0.130 254 12/21/2024
3.0.129 115 12/21/2024
3.0.128 172 12/20/2024
3.0.127 113 12/20/2024
3.0.126 196 12/20/2024
3.0.125 118 12/20/2024
3.0.124 219 12/20/2024
3.0.123 194 12/20/2024
3.0.122 127 12/20/2024
3.0.121 192 12/20/2024
3.0.120 214 12/19/2024
3.0.119 200 12/19/2024
3.0.118 115 12/19/2024
3.0.117 170 12/19/2024
3.0.116 106 12/18/2024
3.0.115 159 12/18/2024
3.0.114 228 12/17/2024
3.0.113 130 12/17/2024
3.0.112 99 12/17/2024
3.0.111 236 12/16/2024
3.0.110 321 12/10/2024
3.0.109 124 12/10/2024
3.0.108 188 12/10/2024
3.0.107 115 12/9/2024
3.0.106 195 12/9/2024
3.0.105 242 12/9/2024
3.0.104 114 12/9/2024
3.0.103 316 12/7/2024
3.0.102 138 12/6/2024
3.0.101 135 12/6/2024
3.0.100 132 12/6/2024
3.0.99 144 12/6/2024
3.0.97 165 12/6/2024
3.0.96 145 12/6/2024
3.0.95 128 12/6/2024
3.0.94 126 12/6/2024
3.0.93 120 12/6/2024
3.0.92 122 12/6/2024
3.0.91 157 12/6/2024
3.0.90 140 12/5/2024
3.0.89 145 12/5/2024
3.0.88 695 12/5/2024
3.0.87 162 12/5/2024
3.0.86 162 12/5/2024
3.0.85 208 12/5/2024
3.0.84 147 12/4/2024
3.0.83 168 12/4/2024
3.0.82 221 12/4/2024
3.0.81 223 12/4/2024
3.0.80 187 12/4/2024
3.0.79 120 12/3/2024
3.0.78 224 12/3/2024
3.0.77 207 12/3/2024
3.0.76 181 12/3/2024
3.0.75 113 12/3/2024
3.0.74 157 12/3/2024
3.0.73 114 12/3/2024
3.0.72 384 12/2/2024
3.0.71 173 12/2/2024
3.0.70 184 12/2/2024
3.0.69 114 12/2/2024
3.0.68 195 12/2/2024
3.0.67 241 12/1/2024
3.0.66 128 12/1/2024
3.0.65 272 12/1/2024
3.0.64 154 12/1/2024
3.0.63 230 11/29/2024
3.0.62 197 11/29/2024
3.0.61 275 11/21/2024
3.0.60 136 11/21/2024
3.0.59 281 11/20/2024
3.0.58 117 11/20/2024
3.0.57 143 11/20/2024
3.0.56 124 11/20/2024
3.0.55 118 11/20/2024
3.0.54 144 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 400 11/19/2024
3.0.49 112 11/19/2024
3.0.48 333 11/19/2024
3.0.47 112 11/19/2024
3.0.46 117 11/19/2024
3.0.45 325 11/15/2024
3.0.44 163 11/14/2024
3.0.43 124 11/14/2024
3.0.42 116 11/14/2024
3.0.41 164 11/14/2024
3.0.40 127 11/14/2024
3.0.39 239 11/14/2024
3.0.38 333 11/14/2024
3.0.37 182 11/14/2024
3.0.36 123 11/14/2024
3.0.35 113 11/14/2024
3.0.34 166 11/14/2024
3.0.33 129 11/14/2024
3.0.32 211 11/14/2024
2.1.31 319 11/13/2024
2.1.30 208 11/13/2024
2.1.29 279 11/13/2024
2.1.28 171 11/12/2024
2.1.27 109 11/12/2024
2.1.26 665 11/9/2024
2.1.25 209 11/9/2024
2.1.24 374 11/8/2024
2.1.23 133 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 289 11/6/2024
2.1.18 360 11/1/2024
2.1.17 126 11/1/2024
2.1.16 361 11/1/2024
2.1.14 129 10/29/2024
2.1.13 275 10/29/2024
2.1.12 170 10/29/2024
2.1.11 442 10/29/2024
2.1.10 280 10/28/2024
2.1.9 114 10/28/2024
2.1.8 154 10/28/2024
2.1.7 371 10/26/2024
2.1.6 147 10/26/2024
2.1.5 283 10/22/2024
2.1.4 133 10/22/2024
2.1.3 119 10/22/2024
2.1.2 128 10/22/2024
2.1.1 147 10/22/2024