concurrently

package
v3.136.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package concurrently has helpers for writing concurrent code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[In, Out any, InS ~[]In](ctx context.Context, in InS, f func(context.Context, int, In) (Out, error), opts ...Option) ([]Out, error)

Map transforms an input slice into an output slice via a function f. It calls f as concurrently as reasonably possible (up to GOMAXPROCS by default).

Types

type Option

type Option func(*config)

Option funcs alter how the concurrent algorithms behave.

func WithWorkerCount

func WithWorkerCount(n int) Option

WithWorkerCount overrides the default worker count for the operation. If n ≤ 0, it uses the default worker count.

Jump to

Keyboard shortcuts

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