concurrent

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcurrentExecute

func ConcurrentExecute(
	ctx context.Context,
	ids []int64,
	task func(context.Context, int64) error,
	maxConcurrent ...int,
) error

ConcurrentExecute is a general-purpose concurrent execution function Parameters: - ctx: Context - ids: List of IDs to process - task: Function to process a single ID (additional parameters can be captured via closures if needed) - maxConcurrent: Maximum concurrency (default 20, adjustable based on business needs) Returns: Aggregated error message containing all failed IDs and their errors

Types

This section is empty.

Jump to

Keyboard shortcuts

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