pool

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoneFunc

type DoneFunc func()

type Job

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

func (*Job) GetPriority

func (job *Job) GetPriority() int

func (*Job) GetResult

func (job *Job) GetResult() (interface{}, error)

func (*Job) SetPriority

func (job *Job) SetPriority(prio int)

type Pool

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

func New

func New(size int, work WorkFunc) *Pool

func (*Pool) NewJob

func (pool *Pool) NewJob(req interface{}, prio int) (*Job, DoneFunc)

type WorkFunc

type WorkFunc func(interface{}, int) (interface{}, error)

Jump to

Keyboard shortcuts

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