Soenneker.Utils.RateLimiting.Executor 3.0.427

Prefix Reserved
dotnet add package Soenneker.Utils.RateLimiting.Executor --version 3.0.427
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 3.0.427
                    
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.427" />
                    
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.427" />
                    
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.427
                    
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 3.0.427"
                    
#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.
#addin nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.427
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=3.0.427
                    
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.427 102 7/4/2025
3.0.426 210 7/3/2025
3.0.425 279 6/28/2025
3.0.424 139 6/27/2025
3.0.423 52 6/27/2025
3.0.422 67 6/27/2025
3.0.421 706 6/11/2025
3.0.420 451 6/3/2025
3.0.419 346 5/27/2025
3.0.418 140 5/27/2025
3.0.417 213 5/27/2025
3.0.416 463 5/23/2025
3.0.415 134 5/23/2025
3.0.414 151 5/22/2025
3.0.413 692 5/8/2025
3.0.412 158 5/7/2025
3.0.411 145 5/7/2025
3.0.410 431 5/5/2025
3.0.409 236 5/5/2025
3.0.408 139 5/5/2025
3.0.407 198 5/5/2025
3.0.406 153 5/5/2025
3.0.405 777 4/8/2025
3.0.404 158 4/8/2025
3.0.403 159 4/8/2025
3.0.402 423 4/8/2025
3.0.401 178 4/8/2025
3.0.400 161 4/8/2025
3.0.399 177 4/8/2025
3.0.398 163 4/8/2025
3.0.397 487 4/7/2025
3.0.396 171 4/7/2025
3.0.395 220 4/7/2025
3.0.394 323 4/7/2025
3.0.393 174 4/7/2025
3.0.392 177 4/7/2025
3.0.391 158 4/6/2025
3.0.390 159 4/6/2025
3.0.389 143 4/6/2025
3.0.388 133 4/6/2025
3.0.387 112 4/6/2025
3.0.386 113 4/6/2025
3.0.385 106 4/6/2025
3.0.384 112 4/6/2025
3.0.383 115 4/5/2025
3.0.382 93 4/5/2025
3.0.381 79 4/5/2025
3.0.380 92 4/5/2025
3.0.379 95 4/5/2025
3.0.378 86 4/5/2025
3.0.377 86 4/5/2025
3.0.376 113 4/4/2025
3.0.375 105 4/4/2025
3.0.374 1,354 4/3/2025
3.0.373 262 4/1/2025
3.0.372 194 4/1/2025
3.0.371 222 4/1/2025
3.0.370 196 3/31/2025
3.0.369 156 3/31/2025
3.0.368 224 3/31/2025
3.0.367 302 3/31/2025
3.0.366 176 3/29/2025
3.0.365 86 3/29/2025
3.0.364 120 3/29/2025
3.0.363 669 3/25/2025
3.0.362 494 3/25/2025
3.0.361 315 3/21/2025
3.0.360 168 3/21/2025
3.0.359 418 3/18/2025
3.0.358 237 3/18/2025
3.0.357 212 3/15/2025
3.0.356 68 3/15/2025
3.0.355 417 3/12/2025
3.0.354 187 3/12/2025
3.0.353 245 3/12/2025
3.0.352 176 3/11/2025
3.0.351 318 3/11/2025
3.0.350 235 3/11/2025
3.0.349 157 3/11/2025
3.0.348 421 3/11/2025
3.0.347 375 3/7/2025
3.0.346 342 3/7/2025
3.0.345 331 3/2/2025
3.0.344 145 3/2/2025
3.0.343 152 3/2/2025
3.0.342 94 3/2/2025
3.0.341 107 3/2/2025
3.0.340 216 3/2/2025
3.0.339 212 3/1/2025
3.0.338 95 3/1/2025
3.0.337 94 3/1/2025
3.0.336 415 3/1/2025
3.0.335 123 3/1/2025
3.0.334 83 3/1/2025
3.0.333 200 3/1/2025
3.0.332 86 3/1/2025
3.0.331 88 3/1/2025
3.0.330 312 2/25/2025
3.0.329 144 2/25/2025
3.0.328 183 2/25/2025
3.0.327 209 2/25/2025
3.0.326 157 2/25/2025
3.0.325 389 2/23/2025
3.0.324 156 2/23/2025
3.0.323 97 2/22/2025
3.0.322 363 2/22/2025
3.0.321 189 2/22/2025
3.0.320 134 2/22/2025
3.0.319 200 2/22/2025
3.0.318 97 2/21/2025
3.0.317 223 2/21/2025
3.0.316 269 2/21/2025
3.0.315 323 2/19/2025
3.0.314 131 2/19/2025
3.0.313 133 2/19/2025
3.0.312 112 2/18/2025
3.0.311 315 2/18/2025
3.0.310 171 2/18/2025
3.0.309 102 2/18/2025
3.0.308 456 2/14/2025
3.0.307 100 2/14/2025
3.0.306 188 2/13/2025
3.0.305 408 2/12/2025
3.0.304 119 2/12/2025
3.0.303 191 2/12/2025
3.0.302 199 2/11/2025
3.0.301 183 2/11/2025
3.0.300 310 2/11/2025
3.0.299 258 2/11/2025
3.0.298 105 2/11/2025
3.0.297 191 2/11/2025
3.0.296 202 2/10/2025
3.0.295 152 2/10/2025
3.0.294 200 2/10/2025
3.0.293 102 2/10/2025
3.0.292 103 2/10/2025
3.0.291 387 2/9/2025
3.0.290 113 2/8/2025
3.0.289 89 2/8/2025
3.0.288 95 2/8/2025
3.0.287 105 2/8/2025
3.0.286 324 2/8/2025
3.0.285 113 2/7/2025
3.0.284 149 2/7/2025
3.0.283 262 2/7/2025
3.0.282 98 2/7/2025
3.0.281 92 2/7/2025
3.0.280 94 2/7/2025
3.0.279 145 2/7/2025
3.0.278 98 2/7/2025
3.0.277 112 2/7/2025
3.0.276 384 2/6/2025
3.0.275 258 2/5/2025
3.0.274 168 2/5/2025
3.0.273 101 2/5/2025
3.0.272 115 2/5/2025
3.0.271 246 2/5/2025
3.0.270 109 2/5/2025
3.0.269 102 2/5/2025
3.0.268 512 1/28/2025
3.0.267 97 1/28/2025
3.0.266 110 1/28/2025
3.0.265 326 1/27/2025
3.0.264 109 1/27/2025
3.0.263 87 1/27/2025
3.0.262 83 1/27/2025
3.0.261 152 1/27/2025
3.0.260 105 1/27/2025
3.0.259 283 1/26/2025
3.0.258 111 1/26/2025
3.0.257 103 1/26/2025
3.0.256 85 1/26/2025
3.0.255 182 1/25/2025
3.0.254 210 1/25/2025
3.0.253 88 1/25/2025
3.0.252 94 1/25/2025
3.0.251 87 1/25/2025
3.0.250 202 1/25/2025
3.0.249 382 1/24/2025
3.0.248 131 1/24/2025
3.0.247 199 1/24/2025
3.0.246 155 1/24/2025
3.0.245 260 1/24/2025
3.0.244 196 1/23/2025
3.0.243 263 1/21/2025
3.0.242 99 1/21/2025
3.0.241 172 1/21/2025
3.0.240 104 1/21/2025
3.0.239 94 1/21/2025
3.0.238 286 1/21/2025
3.0.237 92 1/21/2025
3.0.236 92 1/21/2025
3.0.235 88 1/21/2025
3.0.234 91 1/21/2025
3.0.233 90 1/20/2025
3.0.232 106 1/20/2025
3.0.231 579 1/20/2025
3.0.230 99 1/20/2025
3.0.229 89 1/20/2025
3.0.228 242 1/20/2025
3.0.227 1,828 1/14/2025
3.0.226 72 1/14/2025
3.0.225 81 1/14/2025
3.0.224 148 1/14/2025
3.0.223 192 1/13/2025
3.0.222 180 1/13/2025
3.0.221 132 1/13/2025
3.0.220 85 1/13/2025
3.0.219 79 1/13/2025
3.0.218 226 1/12/2025
3.0.217 167 1/11/2025
3.0.216 139 1/11/2025
3.0.215 144 1/11/2025
3.0.214 100 1/11/2025
3.0.213 137 1/10/2025
3.0.212 99 1/10/2025
3.0.211 85 1/10/2025
3.0.210 92 1/10/2025
3.0.209 241 1/10/2025
3.0.208 101 1/10/2025
3.0.207 98 1/10/2025
3.0.206 644 1/3/2025
3.0.205 126 1/3/2025
3.0.204 167 1/3/2025
3.0.203 122 1/3/2025
3.0.202 203 1/2/2025
3.0.201 101 1/2/2025
3.0.200 99 1/2/2025
3.0.199 184 1/2/2025
3.0.198 101 1/2/2025
3.0.197 98 1/2/2025
3.0.196 408 1/1/2025
3.0.195 182 1/1/2025
3.0.194 110 1/1/2025
3.0.193 128 1/1/2025
3.0.192 214 1/1/2025
3.0.191 104 1/1/2025
3.0.190 107 1/1/2025
3.0.189 115 12/31/2024
3.0.188 102 12/31/2024
3.0.187 106 12/31/2024
3.0.186 109 12/31/2024
3.0.185 108 12/31/2024
3.0.184 161 12/31/2024
3.0.183 117 12/31/2024
3.0.182 397 12/31/2024
3.0.181 96 12/31/2024
3.0.180 261 12/31/2024
3.0.179 166 12/31/2024
3.0.178 102 12/31/2024
3.0.177 108 12/31/2024
3.0.176 105 12/31/2024
3.0.175 93 12/31/2024
3.0.174 126 12/30/2024
3.0.173 358 12/28/2024
3.0.172 122 12/28/2024
3.0.171 158 12/27/2024
3.0.170 99 12/27/2024
3.0.169 429 12/24/2024
3.0.168 203 12/24/2024
3.0.167 126 12/24/2024
3.0.166 106 12/24/2024
3.0.165 189 12/24/2024
3.0.164 94 12/24/2024
3.0.163 190 12/24/2024
3.0.162 87 12/24/2024
3.0.161 136 12/24/2024
3.0.160 106 12/23/2024
3.0.159 163 12/23/2024
3.0.158 179 12/23/2024
3.0.157 107 12/23/2024
3.0.156 276 12/23/2024
3.0.155 117 12/23/2024
3.0.154 261 12/22/2024
3.0.153 102 12/22/2024
3.0.152 104 12/22/2024
3.0.151 210 12/22/2024
3.0.150 105 12/22/2024
3.0.149 100 12/22/2024
3.0.148 97 12/22/2024
3.0.147 279 12/22/2024
3.0.146 102 12/22/2024
3.0.145 113 12/22/2024
3.0.144 109 12/22/2024
3.0.143 265 12/21/2024
3.0.142 103 12/21/2024
3.0.141 111 12/21/2024
3.0.140 96 12/21/2024
3.0.139 108 12/21/2024
3.0.138 95 12/21/2024
3.0.137 98 12/21/2024
3.0.136 106 12/21/2024
3.0.135 287 12/21/2024
3.0.134 185 12/21/2024
3.0.133 97 12/21/2024
3.0.132 100 12/21/2024
3.0.131 91 12/21/2024
3.0.130 245 12/21/2024
3.0.129 96 12/21/2024
3.0.128 161 12/20/2024
3.0.127 96 12/20/2024
3.0.126 183 12/20/2024
3.0.125 102 12/20/2024
3.0.124 207 12/20/2024
3.0.123 181 12/20/2024
3.0.122 112 12/20/2024
3.0.121 174 12/20/2024
3.0.120 197 12/19/2024
3.0.119 186 12/19/2024
3.0.118 108 12/19/2024
3.0.117 153 12/19/2024
3.0.116 99 12/18/2024
3.0.115 148 12/18/2024
3.0.114 209 12/17/2024
3.0.113 116 12/17/2024
3.0.112 83 12/17/2024
3.0.111 222 12/16/2024
3.0.110 308 12/10/2024
3.0.109 107 12/10/2024
3.0.108 180 12/10/2024
3.0.107 102 12/9/2024
3.0.106 181 12/9/2024
3.0.105 222 12/9/2024
3.0.104 99 12/9/2024
3.0.103 300 12/7/2024
3.0.102 121 12/6/2024
3.0.101 121 12/6/2024
3.0.100 116 12/6/2024
3.0.99 123 12/6/2024
3.0.97 149 12/6/2024
3.0.96 125 12/6/2024
3.0.95 110 12/6/2024
3.0.94 110 12/6/2024
3.0.93 106 12/6/2024
3.0.92 105 12/6/2024
3.0.91 141 12/6/2024
3.0.90 129 12/5/2024
3.0.89 133 12/5/2024
3.0.88 683 12/5/2024
3.0.87 149 12/5/2024
3.0.86 150 12/5/2024
3.0.85 194 12/5/2024
3.0.84 131 12/4/2024
3.0.83 152 12/4/2024
3.0.82 211 12/4/2024
3.0.81 203 12/4/2024
3.0.80 179 12/4/2024
3.0.79 107 12/3/2024
3.0.78 204 12/3/2024
3.0.77 198 12/3/2024
3.0.76 165 12/3/2024
3.0.75 98 12/3/2024
3.0.74 149 12/3/2024
3.0.73 98 12/3/2024
3.0.72 371 12/2/2024
3.0.71 158 12/2/2024
3.0.70 175 12/2/2024
3.0.69 101 12/2/2024
3.0.68 180 12/2/2024
3.0.67 228 12/1/2024
3.0.66 108 12/1/2024
3.0.65 259 12/1/2024
3.0.64 141 12/1/2024
3.0.63 212 11/29/2024
3.0.62 184 11/29/2024
3.0.61 264 11/21/2024
3.0.60 124 11/21/2024
3.0.59 266 11/20/2024
3.0.58 108 11/20/2024
3.0.57 130 11/20/2024
3.0.56 111 11/20/2024
3.0.55 109 11/20/2024
3.0.54 123 11/20/2024
3.0.53 116 11/19/2024
3.0.52 107 11/19/2024
3.0.51 102 11/19/2024
3.0.50 390 11/19/2024
3.0.49 97 11/19/2024
3.0.48 317 11/19/2024
3.0.47 101 11/19/2024
3.0.46 107 11/19/2024
3.0.45 303 11/15/2024
3.0.44 151 11/14/2024
3.0.43 107 11/14/2024
3.0.42 100 11/14/2024
3.0.41 147 11/14/2024
3.0.40 117 11/14/2024
3.0.39 227 11/14/2024
3.0.38 325 11/14/2024
3.0.37 170 11/14/2024
3.0.36 107 11/14/2024
3.0.35 104 11/14/2024
3.0.34 152 11/14/2024
3.0.33 113 11/14/2024
3.0.32 199 11/14/2024
2.1.31 305 11/13/2024
2.1.30 192 11/13/2024
2.1.29 271 11/13/2024
2.1.28 154 11/12/2024
2.1.27 100 11/12/2024
2.1.26 657 11/9/2024
2.1.25 193 11/9/2024
2.1.24 355 11/8/2024
2.1.23 116 11/8/2024
2.1.22 111 11/8/2024
2.1.21 299 11/8/2024
2.1.20 245 11/8/2024
2.1.19 271 11/6/2024
2.1.18 348 11/1/2024
2.1.17 110 11/1/2024
2.1.16 339 11/1/2024
2.1.14 121 10/29/2024
2.1.13 265 10/29/2024
2.1.12 157 10/29/2024
2.1.11 429 10/29/2024
2.1.10 269 10/28/2024
2.1.9 104 10/28/2024
2.1.8 135 10/28/2024
2.1.7 363 10/26/2024
2.1.6 124 10/26/2024
2.1.5 271 10/22/2024
2.1.4 125 10/22/2024
2.1.3 105 10/22/2024
2.1.2 112 10/22/2024
2.1.1 130 10/22/2024