Skip to content

Instantly share code, notes, and snippets.

@jonbodner
Last active August 24, 2017 17:00
Show Gist options
  • Save jonbodner/53fd1d353ba2bc66dfe186a8dd9f278c to your computer and use it in GitHub Desktop.
Save jonbodner/53fd1d353ba2bc66dfe186a8dd9f278c to your computer and use it in GitHub Desktop.
future-blog-post-1
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