On Feb 2, 2015, at 11:41 AM, Chris Hegarty <chris.hega...@oracle.com> wrote:
> On 02/02/15 09:29, Paul Sandoz wrote: >> Hi, >> >> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8072030-thenComposeException-test-race-condition/webrev/ >> >> I introduced a silly race condition in the test >> ThenComposeExceptionTest.java. This manifested itself in hotspot testing >> where various VM options increased the probability of failure. > > The changes look fine to me Paul. > Thanks. > This not an issue for the 166 CVS ( test exists only in OpenJDK ). > Yes. > This was a nasty race. In fact there is no guarantee that the CF, that sets > the AtomicReference would even complete, without join/get, right ? > I think the async completion of the thenComposed task will trigger (in the same thread) the completion of the dependent whenCompleted task, such that one could use a count down latch (which would be an odd thing to use). Paul.