Template Function liberate::timeout::backoff

Function Documentation

template<typename backoffT>
inline backoffT liberate::timeout::backoff(backoffT const &backoff, std::size_t const &collisions, backoffT const &min = {})

The backoff function is statically parametrized with the backoff factor. This is to provide for a simpler function prototype that just requires the number of collisions, and returns the actual backoff value.

See also backoff_multiplier

Parameters
  • backoff[in] A factor for backoff times.

  • collisions[in] The number of collisions.

  • min[in] optional; a minimum backoff value.

Returns

the calculated backoff based on the arguments.