hedge
Executes block using the hedged-request pattern: the primary attempt starts immediately, and up to HedgeConfig.maxHedges additional attempts start at increasing multiples of HedgeConfig.hedgeDelay if the previous attempts haven't completed yet. The first attempt to succeed wins; the rest are cancelled. If every attempt fails, the last failure is rethrown.
block may be invoked more than once and concurrently — it must be safe to run multiple times in parallel (e.g. an idempotent GET request).
Return
the result of the first attempt to succeed
Parameters
hedge timing configuration
the operation to execute, possibly multiple times concurrently
Throws
the last observed failure if every attempt fails
Executes block using the hedged-request pattern with named parameters instead of a HedgeConfig instance — convenient for one-off calls.