Domain Detective

API Reference

Class

AsyncIntervalGate

Namespace DnsClientX.Throttling
Assembly DnsClientX
Implements
IDisposable
Modifiers sealed

Provides a simple async gate that ensures callers do not proceed more often than a configured interval.

Inheritance

  • Object
  • AsyncIntervalGate

Remarks

This is useful for rate limiting DNS queries across concurrent tasks.

Constructors

public AsyncIntervalGate(TimeSpan interval) #

Initializes a new instance of the AsyncIntervalGate class.

Parameters

interval System.TimeSpan requiredposition: 0
Minimum interval between permits; negative values are treated as zero.

Methods

public virtual Void Dispose() #
Returns: Void
public async Task WaitAsync(CancellationToken cancellationToken = null) #
Returns: Task

Waits until the next permit is available and then consumes it.

Parameters

cancellationToken System.Threading.CancellationToken = null optionalposition: 0
Token used to cancel the wait.
{{ include "footer" }}