adaptive backoff strategy for busy-wait loops.
More...
#include <backoff.hpp>
|
| | Backoff (size_t spin=200) |
| | construct a backoff strategy.
|
| |
| void | operator() () noexcept |
| | execute one backoff iteration.
|
| |
| void | reset () noexcept |
| | reset backoff to initial state.
|
| |
adaptive backoff strategy for busy-wait loops.
◆ Backoff()
| join::Backoff::Backoff |
( |
size_t | spin = 200 | ) |
|
|
inline |
construct a backoff strategy.
- Parameters
-
| spin | number of active spin iterations before yielding (default: 200). |
◆ operator()()
| void join::Backoff::operator() |
( |
| ) |
|
|
inlinenoexcept |
execute one backoff iteration.
◆ reset()
| void join::Backoff::reset |
( |
| ) |
|
|
inlinenoexcept |
reset backoff to initial state.
The documentation for this class was generated from the following file: