RFR: 8000817: Reinstate accidentally removed sleep() from ProcessBuilder/Basic.java (original) (raw)
Martin Buchholz martinrb at google.com
Fri Oct 12 16:17:57 UTC 2012
- Previous message: RFR: 8000817: Reinstate accidentally removed sleep() from ProcessBuilder/Basic.java
- Next message: RFR: 8000817: Reinstate accidentally removed sleep() from ProcessBuilder/Basic.java
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Oct 12, 2012 at 7:32 AM, Rob McKenna <rob.mckenna at oracle.com> wrote:
Hi folks,
Managed to remove the Thread.sleep(10) from the test when fixing 7152183. Sorry about that. I thought you had done that intentionally, and so "if it passes, then OK".
The way the code's been written, it should now be robustly race-free on Solaris. Do you actually see racy failures on other OSes?
Perhaps do the sleep conditionally, only in the non-Solaris case?
In the Linux case, the reading thread will eventually acquire the monitor lock on the input stream. It might work to wait for that using the hacky but non-racy:
if (stream instanceof BufferedInputStream) { ...
while (Unsafe.tryMonitorEnter(stream)) { Unsafe.MonitorExit(stream); Thread.sleep(1); }
-Rob
- Previous message: RFR: 8000817: Reinstate accidentally removed sleep() from ProcessBuilder/Basic.java
- Next message: RFR: 8000817: Reinstate accidentally removed sleep() from ProcessBuilder/Basic.java
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]