threadpool

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ThreadPool

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

func NewThreadPool

func NewThreadPool(max int, buffer int, exef func(interface{})) *ThreadPool

func (*ThreadPool) AddJob

func (tp *ThreadPool) AddJob(hash int, v interface{})

func (*ThreadPool) AddJobTimeout

func (tp *ThreadPool) AddJobTimeout(hash int, v interface{}, timeoutms int) bool

func (*ThreadPool) GetStat

func (tp *ThreadPool) GetStat() ThreadPoolStat

func (*ThreadPool) ResetStat

func (tp *ThreadPool) ResetStat()

func (*ThreadPool) Stop

func (tp *ThreadPool) Stop()

type ThreadPoolStat

type ThreadPoolStat struct {
	Datalen    []int
	Pushnum    []int
	Processnum []int
}

Jump to

Keyboard shortcuts

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