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 Async ¶
Async a simple way to turn a function into a Future if the function you want to execute takes any parameters consider wrapping it in an anonymous function
func (Future[T]) Await ¶
func (f Future[T]) Await() T
Await blocks until the Future is resolved returns the Future's underlying value may block indefinitely
func (Future[T]) AwaitWithTimeout ¶
AwaitWithTimeout blocks until the Future is resolved or the timeout was reached returns either a pointer to the Future's underlying (*value, true) or (nil, false) if the timeout was reached a timeout does NOT stop the Future's underlying go routine
Click to show internal directories.
Click to hide internal directories.