Back to

Package thread

Latest Go to latest

The latest major version is .

Published: Jul 24, 2020 | License: Apache-2.0 | Module:


func Parallelism

func Parallelism() int

Parallelism returns the current parellism.

This defaults to the number of CPUs.

func Parallelize

func Parallelize(jobs ...func() error) error

Parallelize runs the jobs in parallel.

A max of Parallelism jobs will be run at once. Returns the combined error from the jobs.

func SetParallelism

func SetParallelism(parallelism int)

SetParallelism sets the parallelism.

If parallelism < 1, this sets the parallelism to 1.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier