workerpool

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WorkerPool

func WorkerPool(n int, w WorkerFunc) (waitFunc func())

WorkerPool starts a pool of n workers each running the WorkerFunc w.

Returns a function waitFunc, that when called waits for all workers to finish.

Types

type WorkerFunc

type WorkerFunc func(worker int)

WorkerFunc implements a function that can be used in a WorkerPool.

worker is a unique integer identifying the worker, starting at 0.

Jump to

Keyboard shortcuts

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