Documentation ¶
Overview ¶
Package race contains a helper to "race" two functions, returning the first successful result. It also allows explicitly triggering the (possibly-waiting) second function when the first function returns an error or indicates that it should be retried.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Race ¶
type Race[T any] struct { // contains filtered or unexported fields }
Race allows running two functions concurrently and returning the first non-error result returned.
Click to show internal directories.
Click to hide internal directories.