workerpool

package
v0.0.0-...-752db19 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerPool

type WorkerPool[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any]() *WorkerPool[T]

func (*WorkerPool[T]) Await

func (wp *WorkerPool[T]) Await() <-chan struct{}

func (*WorkerPool[T]) Range

func (wp *WorkerPool[T]) Range(tasks <-chan T) *WorkerPool[T]

func (*WorkerPool[T]) WithContext

func (wp *WorkerPool[T]) WithContext(ctx context.Context) *WorkerPool[T]

func (*WorkerPool[T]) WithHandler

func (wp *WorkerPool[T]) WithHandler(h func(T)) *WorkerPool[T]

func (*WorkerPool[T]) WithMaxGoroutines

func (wp *WorkerPool[T]) WithMaxGoroutines(n int) *WorkerPool[T]

Jump to

Keyboard shortcuts

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