Tweak the pool sizes and allow for longer time to load things. This improves reliabi...
[debian/openrocket] / core / src / net / sf / openrocket / startup / ConcurrentLoadingThrustCurveMotorSetDatabase.java
index c52d72e19e09255e206ed7648f854f2c2ae3248e..2eba9b426206018e08596b273a8f633f70b731b6 100644 (file)
@@ -149,7 +149,7 @@ public class ConcurrentLoadingThrustCurveMotorSetDatabase extends ThrustCurveMot
                                }
                        });
 
-                       loaderPool = new ThreadPoolExecutor(25,25, 2, TimeUnit.SECONDS,
+                       loaderPool = new ThreadPoolExecutor(10,10, 2, TimeUnit.SECONDS,
                                        new LinkedBlockingQueue<Runnable>(),
                                        new ThreadFactory() {
                                int threadCount = 0;
@@ -178,9 +178,9 @@ public class ConcurrentLoadingThrustCurveMotorSetDatabase extends ThrustCurveMot
                private void waitForFinish() throws InterruptedException {
                        try {
                                loaderPool.shutdown();
-                               loaderPool.awaitTermination(30, TimeUnit.SECONDS);
+                               loaderPool.awaitTermination(90, TimeUnit.SECONDS);
                                writerThread.shutdown();
-                               writerThread.awaitTermination(30, TimeUnit.SECONDS);
+                               writerThread.awaitTermination(90, TimeUnit.SECONDS);
                        }
                        finally {
                                iterator.close();