concurrentloop

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 0 Imported by: 16

README

concurrentloop

Go

concurrentloop provides a function to call a function concurrently powered by generics, channels, and goroutines.

Install

$ go get github.com/thalesfsp/concurrentloop

Specific version

Example: $ go get github.com/thalesfsp/concurrentloop@v1.2.0

Usage

See example_test.go, and concurrentloop_test.go file.

Documentation

Run $ make doc or check out online.

How it works

A picture worth thousand words.

high-level-arch

Development

Check out CONTRIBUTION.

Release
  1. Update CHANGELOG accordingly.
  2. Once changes from MR are merged.
  3. Tag and release.

Roadmap

Check out CHANGELOG.

Documentation

Overview

Package concurrentloop provides a function to call a function concurrently powered by generics, channels, and goroutines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcurrentProcessing

func ConcurrentProcessing[T any, Result any](sl []T, cF ConcurrentFunc[T, Result]) ([]Result, []error)

ConcurrentProcessing calls the `ConcurrentFunc` concurrently, and returns its results.

Types

type ConcurrentFunc

type ConcurrentFunc[T any, Result any] func(T) (Result, error)

ConcurrentFunc is the function to be called concurrently.

Jump to

Keyboard shortcuts

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