WinJS - Promises @Matlus
WinJS - Promises  @Matlus
Uploaded April 2013 | Updated September 2026, 1 week ago
JavaScript is a single-threaded language. This means that invoking a long-running process blocks all execution until that process completes. UI elements are unresponsive, animations pause, and no other code in the app can run. The solution to this problem is to avoid synchronous execution as much as possible.
One way to do this is to have a function execute at a later time, as with event handlers, which are invoked after another call has raised an event. Callback functions are another kind of asynchronous processing, because they call back into the code that initiated the process.

A promise is an object. The most frequently used method on a promise object is then, which takes three parameters: a function to call when the promise completes successfully, a function to call when the promise completes with an error, and a function to provide progress information. In both the Windows Runtime and the Windows Library for JavaScript you can also use the done function, which takes the same parameters. The difference is that in the case of an error in processing, the then function returns a promise in the error state but does not throw an exception, while the done method throws an exception if an error function is not provided.
WinJS - PromisesFireside Chat SeriesDelegates and Higher Order FunctionsDatabase Sharding - Scaling Relational DatabasesAbstraction in Software DesignSo You Want To Be A Code Reviewer? #5 Part 2 - Method DesignASP.NET Core and NgrokNet Core Custom ConfigurationProviderAsync-Await in C# 5 Part1C# StreamingCustom Loggers. Importance of Logging Off Application ServersPan-Tilt Controller Using Particle Photon and Bluetooth
Shiv Kumar |

WinJS - Promises

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER