Explicitly create the writerThread to be an executor with an unbounded linked blockin...
authorkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Wed, 6 Jun 2012 12:07:18 +0000 (12:07 +0000)
committerkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Wed, 6 Jun 2012 12:07:18 +0000 (12:07 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@760 180e2498-e6e9-4542-8430-84ac67f01cd8

core/src/net/sf/openrocket/startup/ConcurrentLoadingThrustCurveMotorSetDatabase.java

index 0a12605b63c556384304c045fb74b1ba6fa010f3..a546f739e55ff2c5ccec5b636676c4cabdc27635 100644 (file)
@@ -5,7 +5,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.ThreadPoolExecutor;
@@ -124,7 +123,9 @@ public class ConcurrentLoadingThrustCurveMotorSetDatabase extends ThrustCurveMot
 
                private BookKeeping() {
 
-                       writerThread = Executors.newSingleThreadExecutor( new ThreadFactory() {
+                       writerThread = new ThreadPoolExecutor(1,1,200, TimeUnit.SECONDS,
+                                       new LinkedBlockingQueue<Runnable>(),
+                                       new ThreadFactory() {
                                @Override
                                public Thread newThread(Runnable r) {
                                        Thread t = new Thread(r,"MotorWriterThread");