jdeferred / jdeferred

Java Deferred/Promise library similar to JQuery.

Home Page:jdeferred.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a cancellable convenience method

saturnism opened this issue · comments

Add a convenience method to DeferredManager to easily create CancelablePromise. To avoid conflicts in semantics w/ the existing when methods, propose to add cancelable method:

p = dm.cancelable(() -> { ... });
p.cancel();

Maybe this should be part of 1.3 since it will introduce a new signature to the interface. On the other hand, it won't break anyone who didn't implement their own DeferredMananger.

This is superseded by #126