VOOZH about

URL: https://www.nuget.org/packages/soenneker.utils.ratelimiting.executor/

⇱ NuGet Gallery | Soenneker.Utils.RateLimiting.Executor 4.0.540




👁 Image
Soenneker.Utils.RateLimiting.Executor 4.0.540

Prefix Reserved
dotnet add package Soenneker.Utils.RateLimiting.Executor --version 4.0.540
 
 
NuGet\Install-Package Soenneker.Utils.RateLimiting.Executor -Version 4.0.540
 
 
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="4.0.540" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.RateLimiting.Executor" Version="4.0.540" />
 
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 4.0.540
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Utils.RateLimiting.Executor, 4.0.540"
 
 
#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@4.0.540
 
 
#: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=4.0.540
 
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Executor&version=4.0.540
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

👁 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

👁 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 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. 
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
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
Loading failed

Update dependency Soenneker.Extensions.ValueTask to 4.0.116 (#975)