parallel

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package parallel provides a bounded goroutine pool for concurrent API calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool runs at most N goroutines concurrently.

func New

func New(n int) *Pool

New creates a Pool with concurrency limit n (minimum 1).

func (*Pool) Go

func (p *Pool) Go(fn func())

Go submits fn for execution, blocking until a slot is available.

func (*Pool) GoErr

func (p *Pool) GoErr(fn func() error)

GoErr submits fn; any returned error is collected and returned by Wait.

func (*Pool) Wait

func (p *Pool) Wait() []error

Wait blocks until all submitted functions complete. Returns any errors collected from GoErr calls.

Jump to

Keyboard shortcuts

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