![]() |
VOOZH | about |
dotnet add package Soenneker.Utils.RateLimiting.Executor --version 4.0.540
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 4.0.540
<PackageReference Include="Soenneker.Utils.RateLimiting.Executor" Version="4.0.540" />
<PackageVersion Include="Soenneker.Utils.RateLimiting.Executor" Version="4.0.540" />Directory.Packages.props
<PackageReference Include="Soenneker.Utils.RateLimiting.Executor" />Project file
paket add Soenneker.Utils.RateLimiting.Executor --version 4.0.540
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 4.0.540"
#:package Soenneker.Utils.RateLimiting.Executor@4.0.540
#addin nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=4.0.540Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=4.0.540Install 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
RateLimitingExecutor is ideal for interacting with rate-limited APIs or throttling the execution of resource-intensive tasks.
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.
Check out the singleton factory implementation: Soenneker.Utils.RateLimiting.Factory
dotnet add package Soenneker.Utils.RateLimiting.Executor
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
});
}
}
}
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
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. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.540 | 0 | 6/19/2026 |
| 4.0.539 | 0 | 6/18/2026 |
| 4.0.536 | 262 | 6/16/2026 |
| 4.0.535 | 542 | 6/9/2026 |
| 4.0.534 | 601 | 6/6/2026 |
| 4.0.533 | 104 | 6/6/2026 |
| 4.0.532 | 97 | 6/6/2026 |
| 4.0.531 | 255 | 6/5/2026 |
| 4.0.530 | 97 | 6/5/2026 |
| 4.0.527 | 759 | 5/12/2026 |
| 4.0.526 | 862 | 4/23/2026 |
| 4.0.525 | 183 | 4/23/2026 |
| 4.0.524 | 195 | 4/23/2026 |
| 4.0.523 | 105 | 4/23/2026 |
| 4.0.521 | 153 | 4/23/2026 |
| 4.0.520 | 257 | 4/22/2026 |
| 4.0.519 | 176 | 4/21/2026 |
| 4.0.518 | 368 | 4/14/2026 |
| 4.0.517 | 805 | 3/13/2026 |
| 4.0.516 | 301 | 3/13/2026 |
Update dependency Soenneker.Extensions.ValueTask to 4.0.116 (#975)