Documentation ¶
Index ¶
- func Async[M any](process int, push func(chan M), logic func(M))
- func AsyncAlwaysUnique[M UniqueTask](process int, logic func(M)) chan M
- func AsyncAlwaysUniqueWithChan[M UniqueTask](c chan M, process int, logic func(M))
- func AsyncAlwaysWithChan[M any](process int, c chan M, logic func(M))
- func AsyncUnique[M UniqueTask](process int, push func(chan M), logic func(M))
- func Depth(key string) int
- func Lock(key string)
- func Ready(key string, max int)
- func Sync(key string, logic func() error) error
- func Unlock(key string)
- type Pool
- type UniqueTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 AsyncUnique ¶
func AsyncUnique[M UniqueTask](process int, push func(chan M), logic func(M))
Types ¶
type UniqueTask ¶
type UniqueTask interface {
UniqueKey() string
}
Click to show internal directories.
Click to hide internal directories.