Re: RFR 8072030 Race condition in ThenComposeExceptionTest.java

2015-02-03 Thread Chris Hegarty
On 2 Feb 2015, at 11:36, Paul Sandoz paul.san...@oracle.com wrote:

 ...
 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).

Ah ok. I was thinking of the chain of CF’s as a stream, where you need some 
action to pull the result through.  I think it depends on the sequence of async 
and same thread stages, maybe not, I’d need to look into the details a little 
more.

-Chris.

 Paul.



Re: RFR 8072030 Race condition in ThenComposeExceptionTest.java

2015-02-02 Thread Chris Hegarty

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.

This not an issue for the 166 CVS ( test exists only in OpenJDK ).

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 ?


-Chris.


Re: RFR 8072030 Race condition in ThenComposeExceptionTest.java

2015-02-02 Thread Paul Sandoz

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.