future

package
v0.3.41 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 2 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 Ready

func Ready[T any](val T) *Future[T]

func Spawn

func Spawn[T any](fn func() (T, error)) *Future[T]

Spawns `fn` on a new goroutine and returns future which resolves on completion.

func (*Future[T]) Get

func (fut *Future[T]) Get() (T, error)

Jump to

Keyboard shortcuts

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