Last active
August 24, 2017 17:00
-
-
Save jonbodner/53fd1d353ba2bc66dfe186a8dd9f278c to your computer and use it in GitHub Desktop.
future-blog-post-1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package future | |
// Interface represents a future. No concrete implementation is | |
// exposed; all access to a future is via this interface. | |
type Interface interface { | |
// Get returns the values calculated by the future. It will pause until | |
// the value is calculated. | |
// | |
// If Get is invoked multiple times, the same value will be returned each time. | |
// Subsequent calls to Get will return instantaneously. | |
Get() (interface{}, error) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment