Как определить составные ключи в MS Access?

Возможно, вы должны использовать ifCompleteAsync вместо CompletableFuture.runAsync:

    CompletableFuture<Long> cf = CompletableFuture.supplyAsync(() -> 1L)
    .whenCompleteAsync((v, e) -> { 
        try {
            Thread.sleep(1000);
            System.out.println("HERE");
        } catch(InterruptedException exc) {
            //nothing
        }
        //check that thowing an exception also executes the next cf
        throw new RuntimeException("exception");
    })
    .whenCompleteAsync((v, e) -> System.out.println("ALL DONE (exception thrown: " + e + ")"));

    System.out.println("CF code finished");
    System.out.println(cf.get());
13
задан halfer 14 May 2014 в 11:18
поделиться