Class TokenBucket

Class Documentation

class TokenBucket

Public Functions

inline TokenBucket()
inline explicit TokenBucket(double max_per_second)
inline bool try_consume()
inline void reset(double max_per_second)

Reinitialize the bucket with a new rate (avoids move/copy of mutex).