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;
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");