parallelize

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultParallelism int = 16

DefaultParallelism is the default parallelism used in scheduler.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parallelizer

type Parallelizer struct {
	// contains filtered or unexported fields
}

Parallelizer holds the parallelism for scheduler.

func NewParallelizer

func NewParallelizer(p int) Parallelizer

NewParallelizer returns an object holding the parallelism.

func (Parallelizer) Until

func (p Parallelizer) Until(ctx context.Context, pieces int, doWorkPiece workqueue.DoWorkPieceFunc)

Until is a wrapper around workqueue.ParallelizeUntil to use in scheduling algorithms. A given operation will be a label that is recorded in the goroutine metric.

Jump to

Keyboard shortcuts

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