parallel

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Overview

Package parallel runs a batch of jobs a few at a time, as many as a server answers at once.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Each

func Each(ctx context.Context, n, workers int, fn func(ctx context.Context, i int) error) error

Each runs fn for each of n jobs, at most workers at a time, and returns the first error, which ends the run: jobs not started stay so, and running ones see it as their context's cause. A run the caller's context cut short returns that cause, never nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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