Observable versus promise
From Wiki @ Karl Jones dot com
Revision as of 15:29, 2 January 2017 by Karl Jones (Talk | contribs) (Created page with "This article contrasts observables (see Observer pattern) with promises (see Futures and promises). == Run conditions == * Observables are lazy -- they do not run un...")
This article contrasts observables (see Observer pattern) with promises (see Futures and promises).
Run conditions
- Observables are lazy -- they do not run unless subscribed to
- Promises run no matter what
Setup and teardown
- Observables can define both setup and teardown aspects of asynchronous behavior.
Cancellable
- Observables are cancellable.
Retriability
- Observables can be retried
- To retry promises, a caller must have access to the original function that returned the promise.