future

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeferredFuture

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

func Deferred

func Deferred[T any]() *DeferredFuture[T]

func (*DeferredFuture[T]) Await

func (f *DeferredFuture[T]) Await() T

func (*DeferredFuture[T]) Resolve

func (f *DeferredFuture[T]) Resolve(value T)

type Future

type Future[T any] interface {
	Await() T
}

func Resolved

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

Jump to

Keyboard shortcuts

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