CompletableFuture eventual race condition

Martin Buchholz martinrb at
Mon Jul 11 19:04:41 UTC 2016

Why not try to create a sscce that demonstrates the problem?
Your snippet looks like it ought to work.

On Mon, Jul 11, 2016 at 10:44 AM, Francois Green < at>

> I sorry for posting in list, but I need an authoritative answer.  I was
> told by one of the developers of another JVM (Ceylon) language that
> CompletableFuture.supplyAsync(() -> "Hejjo Worjd from Java")
>         .thenApply(s -> s.replaceAll("j","l"))
>         .thenAccept(System.out::println);
> would eventual fail to print if run enough times.  Is this true?

More information about the core-libs-dev mailing list