Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Future ¶
type Future struct {
// contains filtered or unexported fields
}
Future is a type that is essentially the inverse of a channel. With a channel, you have multiple senders and one receiver. With a future, you can have multiple receivers and one sender. Additionally, a future protects against double-sends. Since this is usually used for returning function results, we also capture and return error values as well. Use NewFuture to initialize.
func (*Future) Fired ¶
Fired returns whether or not a value has been set. If Fired is true, Get won't block.
Click to show internal directories.
Click to hide internal directories.