ovok_sdk.auth.single_flight

Deduplication of concurrent calls, such as token refreshes.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.25+2ba84b0

Deduplication of concurrent calls, such as token refreshes.

SingleFlight

SingleFlight()

Bases: Generic[T]

Runs one call at a time; callers who arrive while it runs share its outcome instead of repeating it.

run()

run(call: Callable[[], T]) -> T

Run call, or wait for the run in progress and share its outcome.

Returns

  • T: The call's result.

Raises

  • Exception: Whatever the shared call raised.

Last updated on

On this page