package future

Import Path
	github.com/alitto/pond/v2/internal/future (on go.dev)

Dependency Relation
	imports 3 packages, and imported by one package

Involved Source Files composite.go future.go value.go
Package-Level Type Names (total 6)
/* sort by: | */
Type Parameters: V: any (*CompositeFuture[V]) Cancel(cause error) (*CompositeFuture[V]) Context() context.Context (*CompositeFuture[V]) Done(count int) <-chan struct{} (*CompositeFuture[V]) Wait(count int) ([]V, error) func NewCompositeFuture[V](ctx context.Context) (*CompositeFuture[V], CompositeFutureResolver[V])
Type Parameters: V: any func NewCompositeFuture[V](ctx context.Context) (*CompositeFuture[V], CompositeFutureResolver[V])
A Future represents a value that will be available in the Future. It is always associated with a context that can be used to wait for the value to be available. When the parent context is canceled, the Future will be canceled as well. (*Future) Done() <-chan struct{} (*Future) Err() error Wait waits for the future to complete and returns any error that occurred. *Future : github.com/alitto/pond/v2.Task func NewFuture(ctx context.Context) (*Future, FutureResolver)
func NewFuture(ctx context.Context) (*Future, FutureResolver)
Type Parameters: V: any A Future represents a value that will be available in the Future. It is always associated with a context that can be used to wait for the value to be available. When the parent context is canceled, the Future will be canceled as well. (*ValueFuture[V]) Done() <-chan struct{} (*ValueFuture[V]) Result() (V, error) Get waits for the future to complete and returns the output and any error that occurred. func NewValueFuture[V](ctx context.Context) (*ValueFuture[V], ValueFutureResolver[V])
Type Parameters: V: any func NewValueFuture[V](ctx context.Context) (*ValueFuture[V], ValueFutureResolver[V])
Package-Level Functions (total 3)
Type Parameters: V: any
Type Parameters: V: any