Lean  $LEAN_TAG$
QuantConnect.Util.RateLimit.TokenBucket Class Reference

Provides extension methods for interacting with ITokenBucket instances as well as access to the NullTokenBucket via TokenBucket.Null More...

Static Public Member Functions

static void Consume (this ITokenBucket bucket, long tokens, TimeSpan timeout)
 Provides an overload of ITokenBucket.Consume that accepts a TimeSpan timeout More...
 

Static Public Attributes

static ITokenBucket Null = new NullTokenBucket()
 Gets an ITokenBucket that always permits consumption More...
 

Detailed Description

Provides extension methods for interacting with ITokenBucket instances as well as access to the NullTokenBucket via TokenBucket.Null

Definition at line 25 of file TokenBucket.cs.

Member Function Documentation

◆ Consume()

static void QuantConnect.Util.RateLimit.TokenBucket.Consume ( this ITokenBucket  bucket,
long  tokens,
TimeSpan  timeout 
)
static

Provides an overload of ITokenBucket.Consume that accepts a TimeSpan timeout

Definition at line 35 of file TokenBucket.cs.

Here is the call graph for this function:

Member Data Documentation

◆ Null

ITokenBucket QuantConnect.Util.RateLimit.TokenBucket.Null = new NullTokenBucket()
static

Gets an ITokenBucket that always permits consumption

Definition at line 30 of file TokenBucket.cs.


The documentation for this class was generated from the following file: