Top "Promise" questions

Promises are a tactic for deferred computing, suitable for several styles of concurrency: thread and event loop concurrency for local computation, and both synchronous and asynchronous remote messaging.

Catching Errors in JavaScript Promises with a First Level try ... catch

So, I want my first level catch to be the one that handles the error. Is there anyway to propagate …

javascript node.js promise bluebird
How can I synchronously determine a JavaScript Promise's state?

I have a pure JavaScript Promise (built-in implementation or poly-fill): var promise = new Promise(function (resolve, reject) { /* ... */ }); From the specification, …

javascript promise es6-promise
What do double brackets mean in javascript and how to access them

Situation I have the following function which uses Promise. var getDefinitions = function() { return new Promise(function(resolve) { resolve(ContactManager.request("…

javascript promise es6-promise
Promise equivalent in C#

In Scala there is a Promise class that could be used to complete a Future manually. I am looking for …

c# promise async-await task future
Is there any analog to a 'finally' in jQuery AJAX calls?

Is there a Java 'finally' analogue in jQuery AJAX calls? I have this code here. In my always I throw …

javascript jquery ajax promise
How can I fetch an array of URLs with Promise.all?

If I have an array of urls: var urls = ['1.txt', '2.txt', '3.txt']; // these text files contain "one", "…

javascript promise es6-promise fetch-api
How to Check Whether an Angular $q promise Is Resolved

I understand that typically one would just attach continuation code with a then() call and chain behaviour when using promises. …

angularjs promise q
nodejs - How to promisify http.request? reject got called two times

I'm trying to wrap http.request into Promise: new Promise(function(resolve, reject) { var req = http.request({ host: '127.0.0.1', …

node.js promise httprequest
fetch: Reject promise with JSON error object

I have an HTTP API that returns JSON data both on success and on failure. An example failure would look …

javascript promise es6-promise fetch-api
Promise - is it possible to force cancel a promise

I use ES6 Promises to manage all of my network data retrieval and there are some situations where I need …

javascript promise cancellation