equal
deleted
inserted
replaced
976 } |
976 } |
977 r = null; |
977 r = null; |
978 } |
978 } |
979 try { |
979 try { |
980 @SuppressWarnings("unchecked") T t = (T) r; |
980 @SuppressWarnings("unchecked") T t = (T) r; |
981 return f.apply(t).toCompletableFuture(); |
981 CompletableFuture<V> g = f.apply(t).toCompletableFuture(); |
|
982 Object s = g.result; |
|
983 if (s != null) |
|
984 return new CompletableFuture<V>(encodeRelay(s)); |
|
985 CompletableFuture<V> d = new CompletableFuture<V>(); |
|
986 UniRelay<V> copy = new UniRelay<V>(d, g); |
|
987 g.push(copy); |
|
988 copy.tryFire(SYNC); |
|
989 return d; |
982 } catch (Throwable ex) { |
990 } catch (Throwable ex) { |
983 return new CompletableFuture<V>(encodeThrowable(ex)); |
991 return new CompletableFuture<V>(encodeThrowable(ex)); |
984 } |
992 } |
985 } |
993 } |
986 CompletableFuture<V> d = new CompletableFuture<V>(); |
994 CompletableFuture<V> d = new CompletableFuture<V>(); |