public void resolveOutstandingQueries() {
        FutureQuery fq;
        while (!outstandingQueries.isEmpty()) {
            fq = outstandingQueries.remove(0);
            if (!fq.future.isDone()) {
                if (fq.runnable != null) fq.runnable.run();
                fq.future.cancel(true);
            }
        }
    }