future

package
v0.0.0-...-623d1b0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wait1

func Wait1[T any](f1 Future[T], callback func(T))

func Wait2

func Wait2[T, U any](f1 Future[T], f2 Future[U], callback func(T, U))

func Wait3

func Wait3[T, U, V any](f1 Future[T], f2 Future[U], f3 Future[V], callback func(T, U, V))

func Wait4

func Wait4[T, U, V, W any](f1 Future[T], f2 Future[U], f3 Future[V], f4 Future[W], callback func(T, U, V, W))

func Wait5

func Wait5[T, U, V, W, X any](f1 Future[T], f2 Future[U], f3 Future[V], f4 Future[W], f5 Future[X], callback func(T, U, V, W, X))

func Wait6

func Wait6[T, U, V, W, X, Y any](f1 Future[T], f2 Future[U], f3 Future[V], f4 Future[W], f5 Future[X], f6 Future[Y], callback func(T, U, V, W, X, Y))

func Wait7

func Wait7[T, U, V, W, X, Y, Z any](f1 Future[T], f2 Future[U], f3 Future[V], f4 Future[W], f5 Future[X], f6 Future[Y], f7 Future[Z], callback func(T, U, V, W, X, Y, Z))

Types

type Future

type Future[T any] interface {
	Get() T
	Set(T)
	IsSet() bool
	C() <-chan T
}

func Instant

func Instant[T any](value T) Future[T]

func New

func New[T any]() Future[T]

func NewFromChannel

func NewFromChannel[T any](ch <-chan T) Future[T]

Jump to

Keyboard shortcuts

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