@Override
        public void run() {
            lock.lock();
            if (repaintRequested && removeRequested() && addRequested()) {
                // repaint successful, set flag to false
                repaintRequested = false;
            }
            lock.unlock();
        }
magic number of milliseconds. maximum allowed time of adding or removing items to googlemap
main/src/main/java/cgeo/geocaching/maps/google/v2/GoogleMapObjectsQueue.java