Retries a future-factory according to a policy, returning a SemiFuture.
Declared in <folly/futures/Retrying.h>
template<
class Policy,
class FF>
[[nodiscard]]
SemiFuture<isFutureOrSemiFuture<std::invoke_result_t<FF, size_t>>::Inner>
retrying(
Policy&& p,
FF&& ff);
A SemiFuture with the result of the first successful attempt.
The return value should not be discarded.
| Name | Description |
|---|---|
| p | The retry policy deciding whether another attempt is made. |
| ff | The future-factory invoked to produce each attempt. |