From: <ha...@us...> - 2006-06-10 16:00:47
|
Revision: 5213 Author: hansonr Date: 2006-06-10 09:00:40 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/jmol/?rev=5213&view=rev Log Message: ----------- bob200603 Geodesic synchronize fix Thank you, Nico! Modified Paths: -------------- branches/bob200603/Jmol/src/org/jmol/g3d/Geodesic3D.java Modified: branches/bob200603/Jmol/src/org/jmol/g3d/Geodesic3D.java =================================================================== --- branches/bob200603/Jmol/src/org/jmol/g3d/Geodesic3D.java 2006-06-10 15:37:01 UTC (rev 5212) +++ branches/bob200603/Jmol/src/org/jmol/g3d/Geodesic3D.java 2006-06-10 16:00:40 UTC (rev 5213) @@ -180,23 +180,9 @@ //System.out.println(msg+" 1"); } - static Boolean[] testInit = new Boolean[1]; - private void initialize() { - //System.out.println("geodesic init " + testInit[0] + " started"); - if (testInit[0] != null) { - while (!testInit[0].booleanValue()) { - try{ - Thread.sleep(10); - } catch(Exception e) { - System.out.println("geodesic constructor error "+e); - } - //System.out.println("geodesic init "+ testInit + " waiting"); - } - //System.out.println("geodesic init skipped"); + private static synchronized void initialize() { + if(vertexCounts != null) return; - } - testInit[0] = Boolean.FALSE; - //System.out.println("geodesic init " + testInit + " continuing"); vertexCounts = new short[maxLevel]; neighborVertexesArrays = new short[maxLevel][]; faceVertexesArrays = new short[maxLevel][]; @@ -231,7 +217,6 @@ } } System.out.println("geodesic initialization completed"); - testInit[0] = Boolean.TRUE; } static int getVertexCount(int level) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |