package
0.0.0-20240918081624-c908e9e5a282
Repository: https://github.com/go-sohunjug/utils.git
Documentation: pkg.go.dev
# Functions
NewPromise is factory function for Promise.
Start start a goroutines to execute task function and return a Future that presents the result.
WhenAll receives function slice and returns a Future.
WhenAny returns a Future.
WhenAnyMatched returns a Future.
Wrap return a Future that presents the wrapped value.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
# Structs
AggregateError aggregate multi errors into an error.
CancelledError present the Future object is cancelled.
Future provides a read-only view of promise, the value is set by using Resolve, Reject and Cancel methods of related Promise.
NoMatchedError presents no future that returns matched result in WhenAnyTrue function.
Promise presents an object that acts as a proxy for a result.
PromiseResult presents the result of a promise.
# Interfaces
Canceller is used to check if the future is cancelled It usually be passed to the future task function for future task function can check if the future is cancelled.