FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::venues::SharedRate Struct Reference

One IP's request weight, shared by every account that sends from it (RateLimiter::share_ip). More...

#include <fastmm/venues/rate_limiter.hpp>

Public Attributes

SpinMutex m
 Every order of every account on the IP takes it twice (ip_weight_fits, ip_on_sent), from their network threads at once when a requote spreads over the pool: a spinning lock, so a waiter does not sleep in the kernel for a section of a few dozen nanoseconds.
 
RateLimiter r {1.0}
 its weight buckets, cooldown and hard stop; never shared itself
 

Detailed Description

One IP's request weight, shared by every account that sends from it (RateLimiter::share_ip).

Member Data Documentation

◆ m

SpinMutex fastmm::venues::SharedRate::m

Every order of every account on the IP takes it twice (ip_weight_fits, ip_on_sent), from their network threads at once when a requote spreads over the pool: a spinning lock, so a waiter does not sleep in the kernel for a section of a few dozen nanoseconds.

◆ r

RateLimiter fastmm::venues::SharedRate::r {1.0}

its weight buckets, cooldown and hard stop; never shared itself