xsync

package
v0.0.0-...-016edcc Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Once

type Once[T any] struct {
	RetryOnError bool
	// contains filtered or unexported fields
}

func (*Once[T]) Do

func (o *Once[T]) Do(f func() (T, error)) (T, error)

func (*Once[T]) MustDo

func (o *Once[T]) MustDo(f func() (T, error)) T

type Pool

type Pool[T any] struct {
	New func() T
	// contains filtered or unexported fields
}

func (*Pool[T]) Get

func (p *Pool[T]) Get() T

func (*Pool[T]) Put

func (p *Pool[T]) Put(v T)

type Wait

type Wait struct {
	// contains filtered or unexported fields
}

func NewWait

func NewWait(m sync.Locker) *Wait

func (*Wait) Broadcast

func (w *Wait) Broadcast()

func (*Wait) Signal

func (w *Wait) Signal()

func (*Wait) Wait

func (w *Wait) Wait(completed func() bool) <-chan struct{}

Jump to

Keyboard shortcuts

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