future

package
v0.0.0-...-487cccc Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetMaxGoroutines

func SetMaxGoroutines(maxGoroutines int)

Types

type Execution

type Execution[T any] func() option.Option[T]

func ToExecution

func ToExecution[T any](fn func() (T, error)) Execution[T]

type Future

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

Future is a type that represents a value that will be available in the onceFuture.

func Async

func Async[T any](exec Execution[T]) Future[T]

Async creates a new onceFuture with the given fn function.

Jump to

Keyboard shortcuts

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