depth

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultMinChunk = 256

DefaultMinChunk is the fewest elements an operation will hand to a single goroutine. Below it, the cost of starting a goroutine and collecting its result outweighs the work, and fanning out further makes an operation slower rather than faster.

View Source
const (
	// Fanout determines the number of children each branch will have.
	Fanout = 1 << FanoutBits
)
View Source
const FanoutBits = 3

Variables

This section is empty.

Functions

func MinChunk added in v1.14.0

func MinChunk() int

MinChunk returns the current minimum chunk size, or 0 if parallelism is disabled.

func SetMinChunk added in v1.14.0

func SetMinChunk(n int) int

SetMinChunk sets the minimum chunk size and returns the previous one. A value below 1 disables parallelism.

Types

type Gauge

type Gauge int
var (

	// NonParallel is a Gauge that never triggers parallel behaviour.
	NonParallel Gauge = -1
)

func NewGauge

func NewGauge(count int) Gauge

func (Gauge) Parallel

func (pd Gauge) Parallel(depth int, mask masker.Masker, f func(i int) (bool, int)) (_ bool, matches int)

Jump to

Keyboard shortcuts

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