# HG changeset patch # User Christian Wimmer # Date 1325196308 28800 # Node ID 78fe92fcde6bc5cb1169170a85232df0f38b3ad0 # Parent 6fe63e57244e18788482a08214f75e39ed83eafd Ensure bootstrapping waits until methods are compiled diff -r 6fe63e57244e -r 78fe92fcde6b graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/VMExitsNative.java --- a/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/VMExitsNative.java Thu Dec 29 14:00:57 2011 -0800 +++ b/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/VMExitsNative.java Thu Dec 29 14:05:08 2011 -0800 @@ -121,7 +121,7 @@ // Compile until the queue is empty. int z = 0; - while (compileQueue.getCompletedTaskCount() < compileQueue.getTaskCount()) { + while (compileQueue.getCompletedTaskCount() < Math.max(2, compileQueue.getTaskCount())) { Thread.sleep(100); while (z < compileQueue.getCompletedTaskCount() / 100) { ++z;