ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/CompletableFuture.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/CompletableFuture.java (file contents):
Revision 1.146 by dl, Wed Jan 14 18:58:10 2015 UTC vs.
Revision 1.147 by jsr166, Wed Jan 14 19:05:50 2015 UTC

# Line 2400 | Line 2400 | public class CompletableFuture<T> implem
2400      public <U> CompletableFuture<U> newIncompleteFuture() {
2401          return new CompletableFuture<U>();
2402      }
2403 +
2404      /**
2405       * Returns the default Executor used for async methods that do not
2406       * specify an Executor. This class uses the {@link
# Line 2511 | Line 2512 | public class CompletableFuture<T> implem
2512       * @return this CompletableFuture
2513       * @since 1.9
2514       */
2515 <    public CompletableFuture<T> completeOnTimeout(T value, long timeout,
2515 >    public CompletableFuture<T> completeOnTimeout(T value, long timeout,
2516                                                    TimeUnit unit) {
2517          if (result == null)
2518              whenComplete(new Canceller(Delayer.delay(
# Line 2665 | Line 2666 | public class CompletableFuture<T> implem
2666      }
2667  
2668      /** Action to cancel unneeded timeouts */
2669 <    static final class Canceller implements BiConsumer<Object, Throwable>  {
2669 >    static final class Canceller implements BiConsumer<Object, Throwable> {
2670          final Future<?> f;
2671          Canceller(Future<?> f) { this.f = f; }
2672          public void accept(Object ignore, Throwable ex) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines