7 ms·
Futures sounds a lot like Promises to me. Or am I wrong?
by salibhai 11y ago
Futures sounds a lot like Promises to me. Or am I wrong?
- matt_d 11y agoFutures can be created with promises: - http://en.cppreference.com/w/cpp/thread/future http://en.cppreference.com/w/cpp/thread/future - http://en.cppreference.com/w/cpp/thread/promise http://en.cppreference.com/w/cpp/thread/promise - https://en.wikipedia.org/wiki/Futures_and_promises https://en.wikipedia.org/wiki/Futures_and_promises - http://docs.scala-lang.org/overviews/core/futures.html http://docs.scala-lang.org/overviews/core/futures.html
- misframer 11y agoSenders hold promises, and receivers hold futures. A promise represents a "promise" to deliver a value at some point to the holder of the future.
- fugalh 11y agoYes, the two terms are unfortunately both synonymous (comparing different implementations of the pattern in different languages), and usually have specific meanings in the context of any given implementation. Often, as here, Promise is the write handle and Future is the read handle.