threading

package
v1.9.7-0...-24da1cd Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParallellForLoop

func ParallellForLoop(numWorkers int, from, to int, f func(int) error) error

Types

type ParallelExecutor

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

func NewParallelExecutor

func NewParallelExecutor() *ParallelExecutor

CreateWorkerPool initializes a pool of workers to process tasks.

func (*ParallelExecutor) AddWork

func (wp *ParallelExecutor) AddWork(f func() error)

enqueue work

func (*ParallelExecutor) Execute

func (wp *ParallelExecutor) Execute() error

close work channel and finish

Jump to

Keyboard shortcuts

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