dojo/promise is the package that manages promises, or in other words, communication between asynchronous threads.
Promises are the programming concept that allow easier programming of non-blocking asynchronous code. The
dojo/promise module is Dojo’s implementation of the concept. The module is made up
dojo/promise/Promise and two helper modules
dojo/promise/first. Related modules are
The abstract base class that defines Dojo Promises.
Takes multiple promises and returns a new promise that is fulfilled when all promises have been fulfilled.
Takes multiple promises and returns a new promise that is fulfilled when the first of the promises have been fulfilled.
- Futures and Promises Wikipedia Article
- dojo/Deferred - The class for managing asynchronous threads.
- dojo/when - The module that allows seamless management of promises and other arbitrary values.
- dojo/errors/CancelError - Defines the default error that will be raised if a promise is canceled without a reason.