public void fullyCloseSource() { cancelFutures(); cancelAsynch = true; if (closing.compareAndSet(false, true)) { if (!done && !errored) { this.cwi.cancel(false); } workItem.closeAtomicRequest(this.aqr.getAtomicRequestID()); if (aqr.isSerial() || futureResult == null) { this.cwi.close(); } else { futureResult.addCompletionListener(new CompletionListener<AtomicResultsMessage>() { @Override public void onCompletion(FutureWork<AtomicResultsMessage> future) { if (running) { return; //-- let the other thread close } if (closed.compareAndSet(false, true)) { cwi.close(); } } }); } } }
public void fullyCloseSource() { cancelFutures(); cancelAsynch = true; if (closing.compareAndSet(false, true)) { if (!done && !errored) { this.cwi.cancel(false); } workItem.closeAtomicRequest(this.aqr.getAtomicRequestID()); if (aqr.isSerial() || futureResult == null) { this.cwi.close(); } else { futureResult.addCompletionListener(new CompletionListener<AtomicResultsMessage>() { @Override public void onCompletion(FutureWork<AtomicResultsMessage> future) { if (running) { return; //-- let the other thread close } if (closed.compareAndSet(false, true)) { cwi.close(); } } }); } } }
public void fullyCloseSource() { cancelFutures(); cancelAsynch = true; if (closing.compareAndSet(false, true)) { if (!done && !errored) { this.cwi.cancel(false); } workItem.closeAtomicRequest(this.aqr.getAtomicRequestID()); if (aqr.isSerial() || futureResult == null) { this.cwi.close(); } else { futureResult.addCompletionListener(new CompletionListener<AtomicResultsMessage>() { @Override public void onCompletion(FutureWork<AtomicResultsMessage> future) { if (running) { return; //-- let the other thread close } if (closed.compareAndSet(false, true)) { cwi.close(); } } }); } } }
boolean noResults = false; try { if (futureResult != null || !aqr.isSerial()) { results = asynchGet(); } else {
boolean noResults = false; try { if (futureResult != null || !aqr.isSerial()) { results = asynchGet(); } else {
boolean noResults = false; try { if (futureResult != null || !aqr.isSerial()) { results = asynchGet(); } else {
if (aqr.isSerial()) { return new TupleSource() { boolean processed = false;
if (aqr.isSerial()) { return new TupleSource() { boolean processed = false;
if (aqr.isSerial()) { return new TupleSource() { boolean processed = false;
} else if (!aqr.isSerial()) { dtts.addWork();
} else if (!aqr.isSerial()) { dtts.addWork();
} else if (!aqr.isSerial()) { dtts.addWork();