1) Use ArrayDequeue instead of LinkedList
2) Try to fix synchronization problem