Environment.initializeIfEmpty()
.assignErrorJournal();
}</BUG>
public static void main(String... args) throws Exception {
<BUG>Promise<String> promise = Promises.prepare(get());
promise.onComplete(p -> LOG.info("Promise completed {}", p))</BUG>
.onSuccess(s -> LOG.info("Got value: {}", s))
.onError(t -> LOG.error(t.getMessage(), t));
<BUG>try {</BUG>
promise.onNext("Hello World!");
String s = promise.await(1, TimeUnit.SECONDS);
LOG.info("s={}", s);
<BUG>} finally {
get().shutdown();</BUG>
}

import reactor.rx.Promises;
public class PromiseSamples {
static final Logger LOG = LoggerFactory.getLogger(PromiseSamples.class);
public static void main(String... args) throws Exception {
Promise<String> promise = Promises.prepare();
promise.onComplete(p -> LOG.info("Promise completed {}", p))
.onSuccess(s -> LOG.info("Got value: {}", s))
.onError(t -> LOG.error(t.getMessage(), t));
promise.onNext("Hello World!");
String s = promise.await(1, TimeUnit.SECONDS);
LOG.info("s={}", s);
