code: public synchronized boolean isStarving(long threshold) {
          long now = System.currentTimeMillis();
          for (QueueEntry e : entries.values())
              if (now-e.submissionTime > threshold)
                  return true;
          return false;
      }
docs: Returns true if too much time is spent since some {@link Runnable} is submitted into the queue
  until they get executed.