Finish an operation, updating the display and signalling delayed events
341221
function endOperation(cm) {
    var op = cm.curOp, group = op.ownsGroup;
    if (!group) return;

    try { fireCallbacksForOps(group); }
    finally {
      operationGroup = null;
      for (var i = 0; i < group.ops.length; i++)
        group.ops[i].cm.curOp = null;
      endOperations(group);
    }
  }
1142005
def update_on_event(self, e):
        """"""
        if e.type == QUIT:
            self.running = False

        elif e.type == KEYDOWN:
            if e.key == K_ESCAPE:
                self.running = False

            elif e.key == K_F4 and e.mod & KMOD_ALT:  # Alt+F4 --> quits
                self.running = False

        elif e.type == VIDEORESIZE:
            self.SCREEN_SIZE = e.size
            self.screen = self.new_screen()
400020
def finished(self):
        
        self.data_service.update_activity(self.id, self.name, self.desc,
                                          started_on=self.started,
                                          ended_on=self._current_timestamp_str())
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();
    }
350494
async def _on_progress_notification(self, progress):
        

        conn_string = progress.get('connection_string')
        done = progress.get('done_count')
        total = progress.get('total_count')
        operation = progress.get('operation')

        await self.notify_progress(conn_string, operation, done, total, wait=True)
111555
def finalize(self):
        
        logger.debug("Finalizing: {}".format(self))
        self.plotItem.scene().sigMouseMoved.disconnect(self.mouseMoved)
        self.plotItem.close()
        self.graphicsLayoutWidget.close()
932976
static void finished() {
        Object runner = Run.getThreadRunner();
        synchronized(notifyMap) {
            if (notifyMap.get(runner.toString())) {
                Run.fireRunFinished(runner);
            }
        }
    }
792796
def on_done(self):
        
        if self._d:
            self._d.callback(self)
            self._d = None
108476
@Override protected synchronized void done() {
        // dispose of canvas frames on the Event Dispatcher Thread...
        if (monitorWindows != null) {
            for (int i = 0; i < monitorWindows.length; i++) {
                if (monitorWindows[i] != null) {
                    monitorWindows[i].dispose();
                    monitorWindows[i] = null;
                }
            }
        }
        if (projectorFrame != null) {
            projectorFrame.dispose();
            projectorFrame = null;
            projectorConverter = null;
        }

        // force release of native memory
        System.gc();
        Pointer.deallocateReferences();
    }
1085661
function finish(ch) {
  ch[STATE] = STATES.ENDED
  let waiting = null
  while (
    (waiting = ch.waiting.shift()) // eslint-disable-line no-cond-assign
  ) {
    waiting()
  }
}
300970
def update_finished(self):
        
        if self.is_updateable:
            javabridge.call(self.jobject, "updateFinished", "()V")
        else:
            logger.critical(classes.get_classname(self.jobject) + " is not updateable!")
706134
public void complete() {
        long seqNo = this.operation.getSequenceNumber();
        Preconditions.checkState(seqNo >= 0, "About to complete a CompletableOperation that has no sequence number.");

        this.done = true;
        if (this.successHandler != null) {
            Callbacks.invokeSafely(this.successHandler, null, cex -> log.error("Success Callback invocation failure.", cex));
        }
    }
952390
void afterCompletion(Task task) {
        boolean delayable = schedule(task);
        DrainStatus status = drainStatus.get();
        if (status.shouldDrainBuffers(delayable)) {
            tryToDrainBuffers();
        }
        notifyListener();
    }
477628
private void update(long delay) {
        if (willUpdate) {
            return; // Already a pending update scheduled
        }

        if (!observing) { return; }

        willUpdate = true;

        query.getDatabase().scheduleOnQueryExecutor(new Runnable() {
            @Override
            public void run() {
                update();
            }
        }, delay);
    }
448785
def waitUntilFinished(self):
        
        QtCore.QCoreApplication.processEvents()
        while self.isLoading():
            QtCore.QCoreApplication.processEvents()
767867
void afterCompletion(Task task) {
        boolean delayable = schedule(task);
        if (shouldDrainBuffers(delayable)) {
            tryToDrainBuffers(AMORTIZED_DRAIN_THRESHOLD);
        }
        notifyListener();
    }
449613
def _update_display(self, event=None):
        """"""
        try:
            if self._showvalue:
                self.display_value(self.scale.get())
            if self._tickinterval:
                self.place_ticks()
        except IndexError:
            # happens when configure is called during a orientation change
            # because self.ticks is empty
            pass