Pushes completion to this and b unless either done.
483394
final void orpush(CompletableFuture<?> b, BiCompletion<?,?,?> c) {
        if (c != null) {
            while ((b == null || b.result == null) && result == null) {
                if (tryPushStack(c)) {
                    if (b != null && b != this && b.result == null) {
                        Completion q = new CoCompletion(c);
                        while (result == null && b.result == null &&
                               !b.tryPushStack(q))
                            lazySetNext(q, null); // clear on failure
                    }
                    break;
                }
                lazySetNext(c, null); // clear on failure
            }
        }
    }
82620
private void notifyTTAboutTaskCompletion() {
    if (oobHeartbeatOnTaskCompletion) {
      synchronized (finishedCount) {
        int value = finishedCount.get();
        finishedCount.set(value+1);
        finishedCount.notifyAll();
      }
    }
  }
550850
private void requirePending() {
		if (pending != null) {
			return;
		}

		long exclusionComparable = Long.MIN_VALUE;
		while (nInclusionsRemaining != 0 && !queue.isEmpty()) {
			//find a candidate that is not excluded
			HeapElement inclusion = null;
			do {
				HeapElement candidate = queue.poll();
				if (candidate.inclusion) {
					if (exclusionComparable != candidate.comparable()) {
						inclusion = candidate;
						break;
					}
				} else {
					exclusionComparable = candidate.comparable();
				}
				reattach(candidate);
				if (nInclusionsRemaining == 0) {
					return;
				}
			} while (!queue.isEmpty());
			if (inclusion == null) {
				return;
			}
			long inclusionComparable = inclusion.comparable();

			/*
			 * Check for any following exclusions and for duplicates. We could
			 * change the sort order so that exclusions always preceded
			 * inclusions, but that would be less efficient and would make the
			 * ordering different than the comparable value.
			 */
			boolean excluded = exclusionComparable == inclusionComparable;
			while (!queue.isEmpty() && queue.peek().comparable() == inclusionComparable) {
				HeapElement match = queue.poll();
				excluded |= !match.inclusion;
				reattach(match);
				if (nInclusionsRemaining == 0) {
					return;
				}
			}
			if (!excluded) {
				pending = inclusion;
				return;
			}
			reattach(inclusion);
		}
	}
89206
public void push(T token) {
        if (token == lastPushed) return;
        lastPushed = token;
        if (token.getChannel() == TokenChannel.Default) {
            main.add(token);
        }
        all.add(token);
    }
1203104
def push(self, index=None):
        
        for ind in self.indexes:
            if index and not isinstance(ind, index):
                continue
            ind.push()
333013
def _SetCompleted(self):
    
    with self._lock:
      if self._completed:
        return False
      self._completed = True
      return True
1196138
public void complete() throws CompletionFailure {
        if (completer != null) {
            Completer c = completer;
            completer = null;
            c.complete(this);
        }
    }
712356
void setComplete() {
    this.complete = true;
    try {
      // If we haven't gotten any results back, make sure to create an
      // empty one
      if (this.states.size() == 0) {
        this.states.put(new WorldState());
      }
      // Special WorldState to indicate that the request has completed and
      // interrupt
      // any blocking threads
      else {
        this.states.put(RESPONSE_COMPLETE);
      }
    } catch (InterruptedException e) {
      log.error("Interrupted trying to indicate a completed condition.", e);
    }
  }
103938
def on_complete(&block)
      on do |_, value, reason|
        block.call(reason == nil, value, reason)
      end
    end
792287
private void finishCompletion() {
        // assert state > COMPLETING;
        for (WaitNode q; (q = waiters) != null;) {
            if (U.compareAndSwapObject(this, WAITERS, q, null)) {
                for (;;) {
                    Thread t = q.thread;
                    if (t != null) {
                        q.thread = null;
                        LockSupport.unpark(t);
                    }
                    WaitNode next = q.next;
                    if (next == null)
                        break;
                    q.next = null; // unlink to help gc
                    q = next;
                }
                break;
            }
        }

        done();

        callable = null;        // to reduce footprint
    }
293803
def done(self):
        """"""
        if self._finished or self._unfinished:
            return False
        # Clear the 'current' values when iteration is done.
        self.current_index = self.current_future = None
        return True
491979
def complete(&block)
      name = @current_step_name or raise "No step name"
      completions << CompletionBlock.new("progression_name", name, &block)

      define_method("complete_#{name}") do
        completion = completions.find { |c| c.name == name }
        completion.run(self)
      end
    end
1355396
protected function pushIgnoreDelayed()
    {
        if( $this->delayed ) {
            $this->parts[] = 'DELAYED';
        }
        if( $this->ignore && !$this->replace ) {
            $this->parts[] = 'IGNORE';
        }
    }
246516
private void advance() {
        next = null;

        // While the underlying iterator has paths, check whether any are
        // accepted by the filter.
        while (iterator.hasNext() && next == null) {
            DependencyPath p = iterator.next();
            if (acceptor.accepts(p)) 
                next = p;
        }        
    }
1157609
public void finish() {
		if (mSuccessful) {
			mDb.setTransactionSuccessful();
		}
		mDb.endTransaction();

		if (mSuccessful) {
			for (OnTransactionCommittedListener listener : mOnTransactionCommittedListeners) {
				listener.onTransactionCommitted();
			}
		}
	}
140540
public boolean waitForCompletion() {
        try {
            return completed.get();
        } catch (InterruptedException | ExecutionException e) {
            log.warn("Failed to wait for server completion", e);
        }

        return false;
    }
250415
public void complete() throws CompletionFailure {
        if (completer != Completer.NULL_COMPLETER) {
            Completer c = completer;
            completer = Completer.NULL_COMPLETER;
            c.complete(this);
        }
    }