Well over a year ago I posted an article describing how to employ an asynchrony concept known as a Promise. Since then a number of implementations of Promises have shown up in libraries such as jQuery Deferred and CommonJS. I’ve updated the sources and removed the dependency on ASP.NET Ajax, however the current version depends on features of ECMAScript 5, which is supported in IE 9, Chrome, and Firefox. If you need support for Safari, Opera, or IE 8 and under you need to use an ES5 Polyfill. In addition the license has been changed from MSR-LA (Non-Commercial) to MS-PL which allows commercial use.
A Promise is a programming model that deals with deferred results in concurrent programming. The basic idea around promises are that rather than issuing a blocking call for a resource (IO, Network, etc.) you can immediately return a promise for a future value that will eventually be fulfilled. This allows you to write non-blocking logic that executes asynchronously without having to write a lot of synchronization and plumbing code...