task

package
v0.0.0-...-303e327 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// C alias of Concurrent
	C = Concurrent
	// CC alias of ConcurrentContext
	CC = ConcurrentContext
)

Functions

func Concurrent

func Concurrent(f func(index int, arg interface{}), args []interface{})

Concurrent is tasks run concurrently.

func ConcurrentContext

func ConcurrentContext(ctx context.Context, f func(index int, arg interface{}), args []interface{})

ConcurrentContext is tasks run concurrently with context. How to make []interface{} see: https://golang.org/doc/faq#convert_slice_of_interface

func Run

func Run(ctx context.Context, tasks ...func() error) error

Run executes list of tasks in parallel, returns the first error or nil if all tasks done.

Types

This section is empty.

Jump to

Keyboard shortcuts

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