Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Promise ¶
type Promise[T any] struct { // contains filtered or unexported fields }
Promise is a simple implementation of a component that is represented eventual completion or failure of asynchronous operation and its resulting val
func New ¶
New creates and returns a new Promise instance the execution function will be called in a separate goroutine and not block the caller's execution process, this function manages of execution flow and will decide based on its internal state which function should call The "resolve" function is invoked on success otherwise invokes a "reject"
Click to show internal directories.
Click to hide internal directories.