Soenneker.Utils.RateLimiting.Executor 3.0.413

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.413
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 3.0.413
                    
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.413" />
                    
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.413" />
                    
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.413
                    
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 3.0.413"
                    
#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.413
                    
#: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.413
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.413
                    
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.428 241 7/9/2025
3.0.427 344 7/4/2025
3.0.426 257 7/3/2025
3.0.425 297 6/28/2025
3.0.424 145 6/27/2025
3.0.423 60 6/27/2025
3.0.422 73 6/27/2025
3.0.421 712 6/11/2025
3.0.420 454 6/3/2025
3.0.419 351 5/27/2025
3.0.418 144 5/27/2025
3.0.417 217 5/27/2025
3.0.416 468 5/23/2025
3.0.415 139 5/23/2025
3.0.414 155 5/22/2025
3.0.413 697 5/8/2025
3.0.412 163 5/7/2025
3.0.411 151 5/7/2025
3.0.410 434 5/5/2025
3.0.409 239 5/5/2025
3.0.408 143 5/5/2025
3.0.407 204 5/5/2025
3.0.406 159 5/5/2025
3.0.405 782 4/8/2025
3.0.404 163 4/8/2025
3.0.403 161 4/8/2025
3.0.402 426 4/8/2025
3.0.401 183 4/8/2025
3.0.400 168 4/8/2025
3.0.399 182 4/8/2025
3.0.398 170 4/8/2025
3.0.397 494 4/7/2025
3.0.396 175 4/7/2025
3.0.395 223 4/7/2025
3.0.394 326 4/7/2025
3.0.393 180 4/7/2025
3.0.392 183 4/7/2025
3.0.391 164 4/6/2025
3.0.390 163 4/6/2025
3.0.389 147 4/6/2025
3.0.388 138 4/6/2025
3.0.387 116 4/6/2025
3.0.386 117 4/6/2025
3.0.385 110 4/6/2025
3.0.384 115 4/6/2025
3.0.383 118 4/5/2025
3.0.382 98 4/5/2025
3.0.381 82 4/5/2025
3.0.380 96 4/5/2025
3.0.379 97 4/5/2025
3.0.378 92 4/5/2025
3.0.377 89 4/5/2025
3.0.376 121 4/4/2025
3.0.375 108 4/4/2025
3.0.374 1,359 4/3/2025
3.0.373 265 4/1/2025
3.0.372 200 4/1/2025
3.0.371 230 4/1/2025
3.0.370 203 3/31/2025
3.0.369 159 3/31/2025
3.0.368 231 3/31/2025
3.0.367 311 3/31/2025
3.0.366 185 3/29/2025
3.0.365 90 3/29/2025
3.0.364 126 3/29/2025
3.0.363 677 3/25/2025
3.0.362 503 3/25/2025
3.0.361 319 3/21/2025
3.0.360 171 3/21/2025
3.0.359 421 3/18/2025
3.0.358 242 3/18/2025
3.0.357 218 3/15/2025
3.0.356 71 3/15/2025
3.0.355 421 3/12/2025
3.0.354 192 3/12/2025
3.0.353 250 3/12/2025
3.0.352 182 3/11/2025
3.0.351 324 3/11/2025
3.0.350 238 3/11/2025
3.0.349 160 3/11/2025
3.0.348 424 3/11/2025
3.0.347 382 3/7/2025
3.0.346 348 3/7/2025
3.0.345 334 3/2/2025
3.0.344 151 3/2/2025
3.0.343 158 3/2/2025
3.0.342 99 3/2/2025
3.0.341 113 3/2/2025
3.0.340 221 3/2/2025
3.0.339 215 3/1/2025
3.0.338 102 3/1/2025
3.0.337 101 3/1/2025
3.0.336 419 3/1/2025
3.0.335 128 3/1/2025
3.0.334 87 3/1/2025
3.0.333 203 3/1/2025
3.0.332 93 3/1/2025
3.0.331 94 3/1/2025
3.0.330 317 2/25/2025
3.0.329 151 2/25/2025
3.0.328 188 2/25/2025
3.0.327 213 2/25/2025
3.0.326 161 2/25/2025
3.0.325 396 2/23/2025
3.0.324 161 2/23/2025
3.0.323 101 2/22/2025
3.0.322 371 2/22/2025
3.0.321 196 2/22/2025
3.0.320 141 2/22/2025
3.0.319 204 2/22/2025
3.0.318 102 2/21/2025
3.0.317 228 2/21/2025
3.0.316 272 2/21/2025
3.0.315 330 2/19/2025
3.0.314 137 2/19/2025
3.0.313 140 2/19/2025
3.0.312 116 2/18/2025
3.0.311 322 2/18/2025
3.0.310 178 2/18/2025
3.0.309 105 2/18/2025
3.0.308 460 2/14/2025
3.0.307 103 2/14/2025
3.0.306 194 2/13/2025
3.0.305 414 2/12/2025
3.0.304 125 2/12/2025
3.0.303 196 2/12/2025
3.0.302 205 2/11/2025
3.0.301 191 2/11/2025
3.0.300 314 2/11/2025
3.0.299 263 2/11/2025
3.0.298 109 2/11/2025
3.0.297 195 2/11/2025
3.0.296 205 2/10/2025
3.0.295 159 2/10/2025
3.0.294 203 2/10/2025
3.0.293 107 2/10/2025
3.0.292 107 2/10/2025
3.0.291 392 2/9/2025
3.0.290 119 2/8/2025
3.0.289 93 2/8/2025
3.0.288 100 2/8/2025
3.0.287 110 2/8/2025
3.0.286 329 2/8/2025
3.0.285 123 2/7/2025
3.0.284 155 2/7/2025
3.0.283 264 2/7/2025
3.0.282 101 2/7/2025
3.0.281 98 2/7/2025
3.0.280 97 2/7/2025
3.0.279 150 2/7/2025
3.0.278 103 2/7/2025
3.0.277 116 2/7/2025
3.0.276 389 2/6/2025
3.0.275 262 2/5/2025
3.0.274 171 2/5/2025
3.0.273 107 2/5/2025
3.0.272 122 2/5/2025
3.0.271 249 2/5/2025
3.0.270 114 2/5/2025
3.0.269 105 2/5/2025
3.0.268 518 1/28/2025
3.0.267 102 1/28/2025
3.0.266 113 1/28/2025
3.0.265 330 1/27/2025
3.0.264 114 1/27/2025
3.0.263 96 1/27/2025
3.0.262 88 1/27/2025
3.0.261 156 1/27/2025
3.0.260 111 1/27/2025
3.0.259 286 1/26/2025
3.0.258 114 1/26/2025
3.0.257 110 1/26/2025
3.0.256 89 1/26/2025
3.0.255 188 1/25/2025
3.0.254 217 1/25/2025
3.0.253 92 1/25/2025
3.0.252 100 1/25/2025
3.0.251 92 1/25/2025
3.0.250 205 1/25/2025
3.0.249 388 1/24/2025
3.0.248 136 1/24/2025
3.0.247 206 1/24/2025
3.0.246 162 1/24/2025
3.0.245 267 1/24/2025
3.0.244 201 1/23/2025
3.0.243 271 1/21/2025
3.0.242 108 1/21/2025
3.0.241 180 1/21/2025
3.0.240 109 1/21/2025
3.0.239 100 1/21/2025
3.0.238 291 1/21/2025
3.0.237 98 1/21/2025
3.0.236 97 1/21/2025
3.0.235 92 1/21/2025
3.0.234 101 1/21/2025
3.0.233 93 1/20/2025
3.0.232 113 1/20/2025
3.0.231 584 1/20/2025
3.0.230 103 1/20/2025
3.0.229 95 1/20/2025
3.0.228 245 1/20/2025
3.0.227 1,831 1/14/2025
3.0.226 78 1/14/2025
3.0.225 84 1/14/2025
3.0.224 151 1/14/2025
3.0.223 197 1/13/2025
3.0.222 183 1/13/2025
3.0.221 135 1/13/2025
3.0.220 90 1/13/2025
3.0.219 83 1/13/2025
3.0.218 232 1/12/2025
3.0.217 172 1/11/2025
3.0.216 145 1/11/2025
3.0.215 148 1/11/2025
3.0.214 106 1/11/2025
3.0.213 141 1/10/2025
3.0.212 105 1/10/2025
3.0.211 89 1/10/2025
3.0.210 97 1/10/2025
3.0.209 246 1/10/2025
3.0.208 106 1/10/2025
3.0.207 106 1/10/2025
3.0.206 649 1/3/2025
3.0.205 132 1/3/2025
3.0.204 171 1/3/2025
3.0.203 129 1/3/2025
3.0.202 209 1/2/2025
3.0.201 106 1/2/2025
3.0.200 105 1/2/2025
3.0.199 192 1/2/2025
3.0.198 106 1/2/2025
3.0.197 102 1/2/2025
3.0.196 415 1/1/2025
3.0.195 190 1/1/2025
3.0.194 117 1/1/2025
3.0.193 135 1/1/2025
3.0.192 220 1/1/2025
3.0.191 108 1/1/2025
3.0.190 113 1/1/2025
3.0.189 122 12/31/2024
3.0.188 109 12/31/2024
3.0.187 109 12/31/2024
3.0.186 113 12/31/2024
3.0.185 114 12/31/2024
3.0.184 168 12/31/2024
3.0.183 124 12/31/2024
3.0.182 404 12/31/2024
3.0.181 100 12/31/2024
3.0.180 265 12/31/2024
3.0.179 171 12/31/2024
3.0.178 106 12/31/2024
3.0.177 113 12/31/2024
3.0.176 109 12/31/2024
3.0.175 97 12/31/2024
3.0.174 129 12/30/2024
3.0.173 362 12/28/2024
3.0.172 125 12/28/2024
3.0.171 166 12/27/2024
3.0.170 102 12/27/2024
3.0.169 433 12/24/2024
3.0.168 209 12/24/2024
3.0.167 131 12/24/2024
3.0.166 109 12/24/2024
3.0.165 192 12/24/2024
3.0.164 97 12/24/2024
3.0.163 195 12/24/2024
3.0.162 90 12/24/2024
3.0.161 141 12/24/2024
3.0.160 111 12/23/2024
3.0.159 166 12/23/2024
3.0.158 184 12/23/2024
3.0.157 112 12/23/2024
3.0.156 279 12/23/2024
3.0.155 120 12/23/2024
3.0.154 267 12/22/2024
3.0.153 105 12/22/2024
3.0.152 108 12/22/2024
3.0.151 214 12/22/2024
3.0.150 111 12/22/2024
3.0.149 106 12/22/2024
3.0.148 101 12/22/2024
3.0.147 282 12/22/2024
3.0.146 106 12/22/2024
3.0.145 117 12/22/2024
3.0.144 115 12/22/2024
3.0.143 271 12/21/2024
3.0.142 108 12/21/2024
3.0.141 115 12/21/2024
3.0.140 103 12/21/2024
3.0.139 114 12/21/2024
3.0.138 102 12/21/2024
3.0.137 102 12/21/2024
3.0.136 110 12/21/2024
3.0.135 291 12/21/2024
3.0.134 193 12/21/2024
3.0.133 100 12/21/2024
3.0.132 104 12/21/2024
3.0.131 99 12/21/2024
3.0.130 249 12/21/2024
3.0.129 103 12/21/2024
3.0.128 165 12/20/2024
3.0.127 103 12/20/2024
3.0.126 188 12/20/2024
3.0.125 108 12/20/2024
3.0.124 212 12/20/2024
3.0.123 186 12/20/2024
3.0.122 117 12/20/2024
3.0.121 181 12/20/2024
3.0.120 204 12/19/2024
3.0.119 190 12/19/2024
3.0.118 111 12/19/2024
3.0.117 158 12/19/2024
3.0.116 102 12/18/2024
3.0.115 152 12/18/2024
3.0.114 217 12/17/2024
3.0.113 122 12/17/2024
3.0.112 91 12/17/2024
3.0.111 227 12/16/2024
3.0.110 313 12/10/2024
3.0.109 114 12/10/2024
3.0.108 183 12/10/2024
3.0.107 108 12/9/2024
3.0.106 184 12/9/2024
3.0.105 229 12/9/2024
3.0.104 106 12/9/2024
3.0.103 304 12/7/2024
3.0.102 128 12/6/2024
3.0.101 124 12/6/2024
3.0.100 123 12/6/2024
3.0.99 129 12/6/2024
3.0.97 156 12/6/2024
3.0.96 131 12/6/2024
3.0.95 115 12/6/2024
3.0.94 115 12/6/2024
3.0.93 111 12/6/2024
3.0.92 109 12/6/2024
3.0.91 148 12/6/2024
3.0.90 133 12/5/2024
3.0.89 138 12/5/2024
3.0.88 687 12/5/2024
3.0.87 155 12/5/2024
3.0.86 154 12/5/2024
3.0.85 201 12/5/2024
3.0.84 137 12/4/2024
3.0.83 157 12/4/2024
3.0.82 214 12/4/2024
3.0.81 212 12/4/2024
3.0.80 183 12/4/2024
3.0.79 111 12/3/2024
3.0.78 209 12/3/2024
3.0.77 201 12/3/2024
3.0.76 169 12/3/2024
3.0.75 104 12/3/2024
3.0.74 152 12/3/2024
3.0.73 103 12/3/2024
3.0.72 377 12/2/2024
3.0.71 163 12/2/2024
3.0.70 179 12/2/2024
3.0.69 106 12/2/2024
3.0.68 184 12/2/2024
3.0.67 234 12/1/2024
3.0.66 113 12/1/2024
3.0.65 265 12/1/2024
3.0.64 145 12/1/2024
3.0.63 219 11/29/2024
3.0.62 187 11/29/2024
3.0.61 267 11/21/2024
3.0.60 128 11/21/2024
3.0.59 271 11/20/2024
3.0.58 111 11/20/2024
3.0.57 135 11/20/2024
3.0.56 115 11/20/2024
3.0.55 112 11/20/2024
3.0.54 129 11/20/2024
3.0.53 119 11/19/2024
3.0.52 110 11/19/2024
3.0.51 106 11/19/2024
3.0.50 393 11/19/2024
3.0.49 103 11/19/2024
3.0.48 323 11/19/2024
3.0.47 104 11/19/2024
3.0.46 110 11/19/2024
3.0.45 312 11/15/2024
3.0.44 155 11/14/2024
3.0.43 112 11/14/2024
3.0.42 106 11/14/2024
3.0.41 152 11/14/2024
3.0.40 123 11/14/2024
3.0.39 232 11/14/2024
3.0.38 329 11/14/2024
3.0.37 175 11/14/2024
3.0.36 116 11/14/2024
3.0.35 107 11/14/2024
3.0.34 159 11/14/2024
3.0.33 120 11/14/2024
3.0.32 205 11/14/2024
2.1.31 310 11/13/2024
2.1.30 197 11/13/2024
2.1.29 274 11/13/2024
2.1.28 161 11/12/2024
2.1.27 103 11/12/2024
2.1.26 660 11/9/2024
2.1.25 199 11/9/2024
2.1.24 362 11/8/2024
2.1.23 122 11/8/2024
2.1.22 114 11/8/2024
2.1.21 306 11/8/2024
2.1.20 249 11/8/2024
2.1.19 278 11/6/2024
2.1.18 353 11/1/2024
2.1.17 116 11/1/2024
2.1.16 345 11/1/2024
2.1.14 124 10/29/2024
2.1.13 269 10/29/2024
2.1.12 165 10/29/2024
2.1.11 432 10/29/2024
2.1.10 274 10/28/2024
2.1.9 107 10/28/2024
2.1.8 146 10/28/2024
2.1.7 366 10/26/2024
2.1.6 129 10/26/2024
2.1.5 275 10/22/2024
2.1.4 128 10/22/2024
2.1.3 112 10/22/2024
2.1.2 117 10/22/2024
2.1.1 134 10/22/2024