molix

package module
v0.0.0-...-b9b2690 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 5 Imported by: 0

README

Molix

灵感来自Ants

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPoolCap          = errors.New("invalid size for pool")
	ErrPoolAlreadyStope = errors.New("pool already stoped")
)

Functions

func Cap

func Cap() int

func Free

func Free() int

func Running

func Running() int

func Stop

func Stop()

func Submit

func Submit(t func()) error

Types

type MPool

type MPool struct {
	PanicHandle func(v interface{})
	// contains filtered or unexported fields
}

func NewMPool

func NewMPool(size int32) (*MPool, error)

func (*MPool) Cap

func (m *MPool) Cap() int

func (*MPool) Free

func (m *MPool) Free() int

func (*MPool) Running

func (m *MPool) Running() int

func (*MPool) Stop

func (m *MPool) Stop()

func (*MPool) Submit

func (m *MPool) Submit(t func()) error

type MTask

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

type Status

type Status int32
const (
	RUNNING Status = iota
	STOPED
)

Jump to

Keyboard shortcuts

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