---------- Forwarded message ---------- From: Francois Green <francois.gr...@gmail.com> Date: Mon, Jul 11, 2016 at 3:22 PM Subject: Re: CompletableFuture eventual race condition To: Martin Buchholz <marti...@google.com>
I'm sorry for not posting the complete example. The claim was, given enough trials, this program will eventually fail to print due to a race condition. import java.util.concurrent.*; public class HelloWorld { public static void main(String[] args) { CompletableFuture.supplyAsync(() -> "Hejjo Worjd from Java") .thenApply(s -> s.replaceAll("j","l")) .thenAccept(System.out::println); } } I doubt this claim, but I'm in no position to counter it. Thanks for help you can provide.