Versions in this module Expand all Collapse all v0 v0.0.2 Apr 29, 2024 v0.0.1 Apr 1, 2024 Changes in this version + var ErrNotReady = errors.New("future not ready") + type Future Promise[R] + func DoAsync[R any](g Group, fn func() (R, error)) *Future[R] + func NewAsync[R any](fn func() (R, error)) *Future[R] + func (f *Future[R]) Await(ctx context.Context) (R, error) + func (f *Future[R]) String() string + func (f *Future[R]) Try() (R, error) + func (f *Future[_]) Done() <-chan struct{} + type Group interface + Go func(fn func() error) + type Promise struct + func (p *Promise[R]) Do(fn func() (R, error)) + func (p *Promise[R]) Future() *Future[R] + func (p *Promise[R]) Reject(err error) + func (p *Promise[R]) Resolve(value R) + func (p *Promise[R]) String() string