Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SingleInflight ¶
type SingleInflight struct {
// contains filtered or unexported fields
}
SingleInflight allows only one execution of function at time. For more exhaustive functionality see https://pkg.go.dev/golang.org/x/sync/singleflight.
func NewSingleInflight ¶
func NewSingleInflight() SingleInflight
NewSingleInflight creates new SingleInflight.
func (*SingleInflight) Do ¶
func (i *SingleInflight) Do(f func())
Do executes the given function, making sure that only one execution is in-flight. If another caller comes in, it waits for the original to complete.
Click to show internal directories.
Click to hide internal directories.