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

async

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Future

type Future[T any] struct {
	// contains filtered or unexported fields
}

func Gather

func Gather[T any](promises ...Future[T]) Future[[]Future[T]]

func Run

func Run[T any](f func() T) Future[T]

func Wait

func Wait[T any](promises ...Future[T]) Future[<-chan Future[T]]

func (Future[T]) Channel

func (future Future[T]) Channel() <-chan T

func (Future[T]) ErrorChannel

func (future Future[T]) ErrorChannel() <-chan error

func (Future[T]) MustValue

func (future Future[T]) MustValue() monad.Result[T]

func (Future[T]) Status

func (future Future[T]) Status() Status

func (Future[T]) String

func (future Future[T]) String() string

func (Future[T]) Value

func (future Future[T]) Value() T

func (Future[T]) Wait

func (future Future[T]) Wait()

type FutureNotFinishedError

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

func NewFutureNotFinishedError

func NewFutureNotFinishedError() FutureNotFinishedError

type FutureNotStartedError

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

func NewFutureNotStartedError

func NewFutureNotStartedError() FutureNotStartedError

type Status

type Status int
const (
	StatusNotStarted Status = iota
	StatusWorking
	StatusFinished
	StatusError
)

func (Status) String

func (status Status) String() string

Jump to

Keyboard shortcuts

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