parallel

package
v4.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enqueue

func Enqueue(ctx context.Context, fn func() error) <-chan error

Enqueue adds a single function to the parallel jobs queue. This function will be run when an unused thread is available. Returns a receive-only error channel that will return the error (if any) from the provided function fn when fn has finished executing. The channel will be closed after this.

func GetMaxThreads

func GetMaxThreads() uint

GetMaxThreads returns the current number of threads that will be used for parallel jobs.

func SetMaxThreads

func SetMaxThreads(threads uint) error

SetMaxThreads sets the number of threads that will be used for parallel jobs.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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