Skip to content

Release 0.2.2

Compare
Choose a tag to compare
@Maia-Everett Maia-Everett released this 27 Jun 17:26
· 22 commits to master since this release

Minor improvements.

  • Removed excessive synchronization from Promise. In particular, it no longer executes alien code (then callbacks) within its synchronized blocks, as this is fragile and deadlock-prone (Effective Java item 67). Locks are now only held strictly as necessary.
  • Reject callbacks are now declared as throws Throwable rather than throws Exception. This makes the "execute cleanup code and rethrow" idiom more natural to express in thenApply and thenAccept:
promise.thenApply(result -> { ... }, exception -> {
    loadingIndicator.hide();
    submitButton.enable();
    throw exception;
});