Documentation ¶
Overview ¶
Package future implements a generic future handling system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCanceled = errors.New("future canceled")
ErrCanceled is returned by Wait if the future gets canceled while waiting.
View Source
var ErrTimeout = errors.New("future timeout")
ErrTimeout is returned by Wait if the specified timeout is exceeded.
Functions ¶
This section is empty.
Types ¶
type Future ¶
A Future is a low-level future type that can be extended to transport custom information.
type Store ¶
A Store is used to store futures.
func (*Store) Await ¶
Await will wait until all futures have completed and removed or timeout is reached.
func (*Store) Clear ¶
func (s *Store) Clear()
Clear will cancel all stored futures and remove them if the store is unprotected.
Click to show internal directories.
Click to hide internal directories.