parallelworks

package
v0.0.140 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package parallelworks provides start parallel calls some function with collecting results

Index

Constants

View Source
const (
	WorkersCount                    = 64
	WorkersCountToChanLenMultiplier = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JobData

type JobData struct {
	ID   int
	Data interface{}
}

func (JobData) WriteToChan

func (data JobData) WriteToChan(a chan<- JobData)

type Worker

type Worker func(data JobData) JobData

func (Worker) Run

func (worker Worker) Run(dataList []JobData, workersCount int) map[int]interface{}

Jump to

Keyboard shortcuts

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