public class Promise<G>
Promise allows to set a value with associated Future. Please note that value can be stored only once.
Typically the producer will create promise and return future while keeping the promise to itself. Then when value is ready it can call set_value.