protected final void stopThreads(Exception cause) { // There is no need to stop threads if all threads have already completed. if (done.compareAndSet(false, true)) { exception = cause; // Send stop signal to threads. for (QueryThread thread : threads) { thread.stop(); } sendCancel(); } }
protected final void stopThreads(Exception cause) { // There is no need to stop threads if all threads have already completed. if (done.compareAndSet(false, true)) { exception = cause; // Send stop signal to threads. for (QueryThread thread : threads) { thread.stop(); } sendCancel(); } }