Description
The implementation extends java.util.LinkedList which is not thread safe.
Running droids with the MultiThreadedTaskMaster could spawn endless new threads.
Exception in thread "pool-1-thread-12808" java.util.NoSuchElementException at java.util.LinkedList.remove(LinkedList.java:788) at java.util.LinkedList.removeFirst(LinkedList.java:134) at java.util.LinkedList.poll(LinkedList.java:470) at org.apache.droids.impl.MultiThreadedTaskMaster$TaskExecutor.run(MultiThreadedTaskMaster.java:336) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
I fixed this extending the SimpleTaskQueueWithHistory from java.util.concurrent.LinkedBlockingQueue and rewriting the add and offer methods.