https://kotlinlang.org logo
a

andrewoma

10/07/2015, 10:47 PM
@frankdavid: @cedric Seems like around 3 lines of Java to me: 😄
Copy code
FutureTask<Integer> future1 = new FutureTask<>(FutureTest::myLongComputation);
        FutureTask<Integer> future2 = new FutureTask<>(FutureTest::myOtherLongComputation);
        FutureTask<Integer> future3 = new FutureTask<>(() -> future1.get() + future2.get());
👍 3