wait

package
v0.0.0-...-fad138e Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Async

func Async[M any](process int, push func(chan M), logic func(M))

func AsyncAlwaysUnique

func AsyncAlwaysUnique[M UniqueTask](process int, logic func(M)) chan M

func AsyncAlwaysUniqueWithChan

func AsyncAlwaysUniqueWithChan[M UniqueTask](c chan M, process int, logic func(M))

func AsyncAlwaysWithChan

func AsyncAlwaysWithChan[M any](process int, c chan M, logic func(M))

func AsyncUnique

func AsyncUnique[M UniqueTask](process int, push func(chan M), logic func(M))

func Depth

func Depth(key string) int

func Lock

func Lock(key string)

func Ready

func Ready(key string, max int)

func Sync

func Sync(key string, logic func() error) error

func Unlock

func Unlock(key string)

Types

type Pool

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

func (*Pool) Depth

func (p *Pool) Depth() int

func (*Pool) Lock

func (p *Pool) Lock()

func (*Pool) Unlock

func (p *Pool) Unlock()

type UniqueTask

type UniqueTask interface {
	UniqueKey() string
}

Jump to

Keyboard shortcuts

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