package future
Import Path
github.com/alitto/pond/v2/internal/future (on go.dev)
Dependency Relation
imports 3 packages, and imported by one package
Package-Level Type Names (total 6)
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)
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])
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |