Help us shape the future of Go! Take the 2026 Go Developer Survey

async

package
v0.4.37 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(tasks ...func() (any, error)) ([]any, error)

All runs all tasks and returns their results in the same order as tasks. Nil tasks are skipped and leave a nil result at their index. If any task fails, All discards all results and returns the first error.

func AllResults added in v0.4.37

func AllResults(tasks ...func() (any, error)) ([]any, error)

AllResults runs all tasks and returns their results in the same order as tasks. Unlike All, it keeps the results of the tasks that succeeded when one or more tasks fail. Failed and nil tasks leave a nil result at their index, so the returned slice always has the same length as tasks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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