--- dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java 2015/02/09 13:21:39 2259 +++ dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java 2015/02/09 14:00:53 2260 @@ -72,13 +72,10 @@ for (int i =0; i < LookupMain.max_workers; i++) { LookupWorker worker = new LookupWorker(i, this); - /*Thread t = new Thread(worker); - t.start(); - - workers.put(i, worker);*/ + threadPool.submit(worker); } - while (threadPool.getActiveCount() > 0) { + while (threadPool.getActiveCount() > 0 || threadPool.getQueue().isEmpty() == false) { Thread.sleep(10);//wait for worker threads }