pool

package
v0.0.0-...-f6ff08b Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.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 Job

type Job struct {
	ID  int
	Msg string
}

type ThreadPool

type ThreadPool struct {
	NumWorkers   int
	NumMaxQueues int
	// contains filtered or unexported fields
}

func NewThreadPool

func NewThreadPool(numWorkers, numMaxQueues int) *ThreadPool

func (*ThreadPool) AddJob

func (tp *ThreadPool) AddJob(job Job)

func (*ThreadPool) GetResults

func (tp *ThreadPool) GetResults() <-chan int

func (*ThreadPool) Start

func (tp *ThreadPool) Start()

func (*ThreadPool) Wait

func (tp *ThreadPool) Wait()

Jump to

Keyboard shortcuts

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