xsync

package
v0.5.10-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL