so completion is signaled after the remote comes back.
5450
private void handleCompleter( CountedCompleter cc ) {
    assert cc instanceof H2OCountedCompleter;
    if( _fjtasks == null || !_fjtasks.contains(cc) )
      addCompleter((H2OCountedCompleter)cc);
    _dt.setCompleter(null);
  }
706399
public final synchronized void notifyCompletion() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "notifyCompletion", "finishCount=" + _finishCount);

        if (--_finishCount < 0) {
            // may need to make final state transition here ?
            try {
                switch (_status.getState()) {
                    case TransactionState.STATE_COMMITTING:
                    case TransactionState.STATE_HEURISTIC_ON_COMMIT:
                        _status.setState(TransactionState.STATE_COMMITTED);
                        break;
                    case TransactionState.STATE_ROLLING_BACK:
                    case TransactionState.STATE_HEURISTIC_ON_ROLLBACK:
                        _status.setState(TransactionState.STATE_ROLLED_BACK);
                        break;

                    // one phase commit that resulted in retries ...
                    case TransactionState.STATE_PREPARING:
                    case TransactionState.STATE_COMMITTING_ONE_PHASE:
                        _status.setState(TransactionState.STATE_COMMITTED);
                } // end switch
            } catch (SystemException se) {
                FFDCFilter.processException(se, "com.ibm.tx.jta.TransactionImpl.notifyCompletion", "2416", this);
                if (tc.isDebugEnabled())
                    Tr.debug(tc, "SystemException setting state during completion processing", se);
                // swallow this exception ... we're called in finally blocks!
            } finally {
                forgetTransaction(true);
            }
        } // end if
        if (tc.isEntryEnabled())
            Tr.exit(tc, "notifyCompletion");

    }
366718
def on_ok(self):
        
        if self.dir_select.value:
            npyscreen.notify_wait('In the process of restoring',
                                  title='Restoring...')
            status = self.restore(self.dirs[self.dir_select.value[0]])
            if status[0]:
                npyscreen.notify_confirm('Status of restore:\n' +
                                         status[1])
            else:
                npyscreen.notify_confirm(status[1])
            self.quit()
        else:
            npyscreen.notify_confirm('Choose a version to restore from')
1293577
public void finished()
  {
    if (tc.isEntryEnabled()) 
      SibTr.entry(tc, "finished");
      
    anycastIHIterator = null;
      
    if (tc.isEntryEnabled()) 
      SibTr.exit(tc, "finished");
  }
476192
@Override
    public final void onCompleted(String pin) {
        resetStatus();
        if (isPinCorrect(pin)) {
            setResult(SUCCESS);
            finish();
        } else {
            setLabel(getString(R.string.message_invalid_pin));
        }
    }
41574
function success(item, ctx) {
		item.count++;

		if (item.state === C.CIRCUIT_HALF_OPEN_WAIT)
			circuitClose(item, ctx);
		else
			checkThreshold(item, ctx);
	}
912359
private void waitForCompletions(long timeoutMs) throws InterruptedException {
    Long completedOperation =
        this.completedOperationIds.pollFirst(timeoutMs, TimeUnit.MILLISECONDS);
    if (completedOperation != null) {
      markOperationComplete(completedOperation);
    }
  }
84703
@Override
    public final void onCompleted(String pin) {
        resetStatus();
        if ("".equals(firstPin)) {
            firstPin = pin;
            setLabel(getString(R.string.message_confirm_pin));
        } else {
            if (pin.equals(firstPin)) {
                onPinSet(pin);
                setResult(SUCCESS);
                finish();
            } else {
                setLabel(getString(R.string.message_pin_mismatch));
                firstPin = "";
            }
        }
        resetStatus();
    }
1043553
private void complete() {
		if (stopped) {
			return;
		}

		log.info("Spidering process is complete. Shutting down...");
		this.stopped = true;
		if (httpSender != null) {
			this.getHttpSender().shutdown();
			httpSender = null;
		}

		// Notify the controller to clean up memory
		controller.reset();

		// Issue the shutdown command on a separate thread, as the current thread is most likely one
		// from the pool
		new Thread(new Runnable() {
			@Override
			public void run() {
				if (threadPool != null) {
					threadPool.shutdown();
				}
				// Notify the listeners -- in the meanwhile
				notifyListenersSpiderComplete(true);
				controller.reset();
				threadPool = null;
			}
		}, "ZAP-SpiderShutdownThread-" + id).start();
	}
1373463
def finish(self):
        
        if self._has_responded:
            raise NSQException('already responded')
        self._has_responded = True
        self.on_finish.send(self)
792796
def on_done(self):
        
        if self._d:
            self._d.callback(self)
            self._d = None
452887
def postloop(self):
        
        cmd.Cmd.postloop(self)  # Clean up command completion
        d1_cli.impl.util.print_info("Exiting...")
1166405
public synchronized void complete() {
        if( logger.isInfoEnabled() ) {
            logger.info("[" + this + "] Marking complete");
        }
        if( loaded ) {
            return;
        }
        loaded = true;
        lastTouch = System.currentTimeMillis();
        if( waiting != null && waiting.isEmpty() ) {
            waiting = null;
        }
        notifyAll();
    }
658306
@Override
    public void afterCompletion(TransactionCommon transaction, boolean committed)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "afterCompletion", new Object[] { transaction, Boolean.valueOf(committed) });

        synchronized (this)
        {
            // If the connection is already closed this transaction
            // will have been removed.
            if (!_closed)
            {
                synchronized (_ownedTransactions)
                {
                    // Remove the transaction from the connections list
                    _ownedTransactions.remove(transaction);
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "afterCompletion");
    }
1365978
public void waitForRecoveryCompletion() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "waitForRecoveryCompletion");

        if (!_recoveryCompleted) {
            try {
                if (tc.isEventEnabled())
                    Tr.event(tc, "starting to wait for recovery completion");

                _recoveryInProgress.waitEvent();

                if (tc.isEventEnabled())
                    Tr.event(tc, "completed wait for recovery completion");
            } catch (InterruptedException exc) {
                FFDCFilter.processException(exc, "com.ibm.tx.jta.impl.RecoveryManager.waitForRecoveryCompletion", "1242", this);
                if (tc.isEventEnabled())
                    Tr.event(tc, "Wait for recovery complete interrupted.");
            }
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "waitForRecoveryCompletion");
    }
785412
public void complete(VirtualConnection vc, TCPReadRequestContext rsc) {

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "complete() called: vc=" + vc);
        }
        HttpOutboundServiceContextImpl mySC = (HttpOutboundServiceContextImpl) vc.getStateMap().get(CallbackIDs.CALLBACK_HTTPOSC);
        mySC.continueRead();
    }
609402
private void checkForCompletion() {
        final String methodName = "checkForCompletion(): ";
        // mark the list complete if that was the last awaited key
        if (actualIndices.isEmpty()) {
            if (tc.isDebugEnabled())
                Tr.debug(tc, methodName + "setting state=COMPLETE");
            state = failedKeys == null
                            ? COMPLETE
                            : COMPLETE_WITH_FAILURES; // state change must be last action
        }
    }