Futures, Promises & Streams

To fascilitate asynchronous computations, Glamorous Toolkit provides abstractions for asynchronous programming such as Futures, Promises and Streams.

Future vs Promise

In short, a Future represents an asynchronous computation. A Promise on the other hand represents a value that is being computed and will become available at some point in the future. A computation behind a Promise is a Future and that computation is executed at the moment of the creation of the said Promise. In other words a Future is an asynchronous computation that fulfills a Promise with a value.

Non-blocking User Interface

Futures, Promises and Streams are great building blocks to achieve non-blocking User Interface. Asynchronous widgets & futures chapter explains how to build asynchronous widgets.