RFR: 8029525 - java/lang/ProcessBuilder/Basic.java fails intermittently
Alan Bateman
Alan.Bateman at oracle.com
Thu Dec 5 15:13:16 UTC 2013
On 05/12/2013 14:19, Rob McKenna wrote:
> This failure cropped up again and Roger Riggs spotted that I was
> looking at it from completely the wrong direction. He contributed the
> following fix:
>
> http://cr.openjdk.java.net/~robm/8029525/webrev.01/
>
> This is to avoid a race between:
>
> thread.interrupt();
> p.destroy();
>
> Hoping to get this reviewed and pushed as soon as possible!
The change looks okay, I guess I would rename "latch" to something like
"ready" (as ready+done might be nicer than latch+done).
If you have more time then you might look at using a phaser. It might
also be a bit simpler if the waitFor is done in the main thread and have
the background thread do the interrupt.
In any case, it's good to make this part of the test more robust as it
has been troublesome.
-Alan.
More information about the core-libs-dev
mailing list