Expand description
In-process single-flight coordination.
For a given key, one caller becomes the leader and runs the future; all concurrent callers with the same key await the leader’s outcome. Leaders remove their entry when finished, so a new wave of callers starts fresh.
The type is generic over the outcome because the two call sites differ:
load-flights share the leader’s Result<Certificate, Arc<Error>>, while
obtain-flights only share completion (followers then re-check storage), so
the latter uses SingleFlight<()> and re-runs its logic after waking.
Structs§
- Single
Flight - Coordinates single execution per key.
Enums§
- Flight
Outcome - The result of participating in a flight.