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

Provides a CPU intensive means of waiting for more tokens to be available in ITokenBucket. This strategy is only viable when the requested number of tokens is expected to become available in an extremely short period of time. This implementation aims to keep the current thread executing to prevent potential content switches arising from a thread yielding or sleeping strategy. More...

Inheritance diagram for QuantConnect.Util.RateLimit.BusyWaitSleepStrategy:
[legend]

Public Member Functions

void Sleep ()
 Provides a CPU intensive sleep by executing Thread.SpinWait for a single spin. More...
 

Detailed Description

Provides a CPU intensive means of waiting for more tokens to be available in ITokenBucket. This strategy is only viable when the requested number of tokens is expected to become available in an extremely short period of time. This implementation aims to keep the current thread executing to prevent potential content switches arising from a thread yielding or sleeping strategy.

Definition at line 26 of file BusyWaitSleepStrategy.cs.

Member Function Documentation

◆ Sleep()

void QuantConnect.Util.RateLimit.BusyWaitSleepStrategy.Sleep ( )

Provides a CPU intensive sleep by executing Thread.SpinWait for a single spin.

Implements QuantConnect.Util.RateLimit.ISleepStrategy.

Definition at line 31 of file BusyWaitSleepStrategy.cs.


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