chantask

package
v1.2.24041 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChanTask

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

func NewChanTask

func NewChanTask(maxCache int) *ChanTask

func (*ChanTask) IsTerminated

func (this *ChanTask) IsTerminated() bool

func (*ChanTask) PushTask

func (this *ChanTask) PushTask(fn func(args ...interface{}), args ...interface{}) error

func (*ChanTask) Remain

func (this *ChanTask) Remain() int32

func (*ChanTask) StatusString

func (this *ChanTask) StatusString() string

func (*ChanTask) Stop

func (this *ChanTask) Stop()

type ChanTaskHub

type ChanTaskHub struct {
	// contains filtered or unexported fields
}
var (
	DefaultChanTaskHub *ChanTaskHub
)

func NewChanTaskHub

func NewChanTaskHub() *ChanTaskHub

func (*ChanTaskHub) CheckGetChanTask

func (this *ChanTaskHub) CheckGetChanTask(id string, maxcache int, priority int) (task *ChanTask, refcnt int32)

func (*ChanTaskHub) ReleaseChanTask

func (this *ChanTaskHub) ReleaseChanTask(id string) bool

false: 不存在, 或者有引用 true: 停止成功

func (*ChanTaskHub) StatusDetails

func (this *ChanTaskHub) StatusDetails(all int) string

Jump to

Keyboard shortcuts

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