CSC360: Promises [1/2] Previous pageContentsNext page

Don't expect everything to happen instantaneously!

Instead of calling functions and synchronously waiting for the result, use promises.

Promises are very good for actions that are either resolved successfully or rejected with an error or exception. Later in the class, we will consider RxJS Observables which can additionally be cancelled.

I will walk through slides 1-35: Promises Promises (video)

ES2015 API

Nice examples using Promises.all and Promises.race

Previous pageContentsNext page