map_pool

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobWithResult

type JobWithResult[U any] func() (U, error)

JobWithResult represents a job function that takes an input of type T and returns a result of type U and an error.

type Pool

type Pool[U any] struct {
	// contains filtered or unexported fields
}

func New

func New[U any](workerCount int) *Pool[U]

func (*Pool[U]) AddJob

func (p *Pool[U]) AddJob(job JobWithResult[U])

func (*Pool[U]) Close

func (p *Pool[U]) Close()

func (*Pool[U]) Results

func (p *Pool[U]) Results() <-chan U

func (*Pool[U]) Start

func (p *Pool[U]) Start()

Jump to

Keyboard shortcuts

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