forcefully finish the progress for given stage
496118
def _progress_force_finish(self, stage=0, description=None):
        
        if not self.show_progress:
            return

        self.__check_stage_registered(stage)

        if not self._prog_rep_progressbars[stage]:
            return

        pg = self._prog_rep_progressbars[stage]
        pg.desc = description
        increment = int(pg.total - pg.n)
        if increment > 0:
            pg.update(increment)
        pg.refresh(nolock=True)
        pg.close()
        self._prog_rep_progressbars.pop(stage, None)
        self._prog_rep_descriptions.pop(stage, None)
        self._prog_rep_callbacks.pop(stage, None)
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
    }
1246378
public void finish() {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
            logger.entering(CLASS_NAME,"finish","["+this+"]");

        if (!isCommitted()) {
            commit();
        }

        // flush the OutputStream and Writer
        try {
            flushBuffer(false);
            _rawOut.close();
        }
        catch (IOException e) {
            // Don't want to report errors on early browser closes
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"finish", "Servlet.Exception:.Error.while.finishing.response", e);
            }
        }
        finally {
            _rawOut.reset();
            // PK29451 - remove call to clearHeaders(). Implementation of clearHeaders() was empty,
            // which this method relies on, but has been implemented in PK29451 to make reset() work.
            // _response.clearHeaders();
            
            cleanupFromFinish();
            // LIBERTY _bufferedOut.reset();
            _bufferedWriter.reset();
            // LIBERTY this._responseBuffer = null;
        }

        resetState();

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
            logger.exiting(CLASS_NAME,"finish");
    }
405669
final void postComplete() {
        /*
         * On each step, variable f holds current dependents to pop
         * and run.  It is extended along only one path at a time,
         * pushing others to avoid unbounded recursion.
         */
        CompletableFuture<?> f = this; Completion h;
        while ((h = f.stack) != null ||
               (f != this && (h = (f = this).stack) != null)) {
            CompletableFuture<?> d; Completion t;
            if (f.casStack(h, t = h.next)) {
                if (t != null) {
                    if (f != this) {
                        pushStack(h);
                        continue;
                    }
                    h.next = null;    // detach
                }
                f = (d = h.tryFire(NESTED)) == null ? this : d;
            }
        }
    }
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
987780
@Override
  public void finish() throws IOException {
    try {
      myLock.writeLock().lock();
      logger.debug("Closing file channel to " + this.current.getName() +
              " (download complete).");
      if (this.channel.isOpen()) {
        this.channel.force(true);
      }

      // Nothing more to do if we're already on the target file.
      if (this.isFinished()) {
        return;
      }

      try {
        FileUtils.deleteQuietly(this.target);
        this.raf.close();
        FileUtils.moveFile(this.current, this.target);
      } catch (Exception ex) {
        logger.error("An error occurred while moving file to its final location", ex);
        if (this.target.exists()) {
          throw new IOException("Was unable to delete existing file " + target.getAbsolutePath(), ex);
        }
        FileUtils.copyFile(this.current, this.target);
      }

      this.current = this.target;

      FileUtils.deleteQuietly(this.partial);
      myIsOpen = false;
      logger.debug("Moved torrent data from {} to {}.",
              this.partial.getName(),
              this.target.getName());
    } finally {
      myLock.writeLock().unlock();
    }
  }
461332
def finish(self):
        """"""
        self._my_map['over'] = True  # finished == over?
        self._my_map['completionTime'] = DateTime.utcnow()
        self._save()
682368
public void finish() {
        if (logListenerCommandShell != null) {
            logListenerCommandShell.cancel();
        }
        for (ScreenshotProcessor screenshotProcessor : processors) {
            screenshotProcessor.finish();
        }
    }
865652
def complete(self, nextq=None, delay=None, depends=None):
        ''''''
        if nextq:
            logger.info('Advancing %s to %s from %s',
                self.jid, nextq, self.queue_name)
            return self.client('complete', self.jid, self.client.worker_name,
                self.queue_name, json.dumps(self.data), 'next', nextq,
                'delay', delay or 0, 'depends',
                json.dumps(depends or [])) or False
        else:
            logger.info('Completing %s', self.jid)
            return self.client('complete', self.jid, self.client.worker_name,
                self.queue_name, json.dumps(self.data)) or False
330140
public void finish() {

		try {

			FileChannel channel = getChannel(false);

			if (channel != null && channel.isOpen()) {

				channel.force(true);
				channel.close();

				this.privateFileChannel = null;

				//file.increaseVersion();
				file.notifyUploadCompletion();
			}

		} catch (IOException e) {

			logger.warn("Unable to finish file upload", e);
		}
	}
739580
public void finishStage(ResponseBuilder rb) {
    if (rb.req.getParams().getBool(MtasSolrSearchComponent.PARAM_MTAS, false)
        && rb.stage >= ResponseBuilder.STAGE_EXECUTE_QUERY
        && rb.stage < ResponseBuilder.STAGE_GET_FIELDS) {
      for (ShardRequest sreq : rb.finished) {
        if (sreq.params.getBool(MtasSolrSearchComponent.PARAM_MTAS, false)
            && sreq.params.getBool(PARAM_MTAS_DOCUMENT, false)) {
          // nothing to do
        }
      }
    }
  }
986983
private void advanceRunState(int targetState) {
        // assert targetState == SHUTDOWN || targetState == STOP;
        for (;;) {
            int c = ctl.get();
            if (runStateAtLeast(c, targetState) ||
                ctl.compareAndSet(c, ctlOf(targetState, workerCountOf(c))))
                break;
        }
    }
1152401
def finish(self):
        
        super(InterruptibleMixin, self).finish()
        signal(SIGINT, self.original_handler)
1036084
public void finish() {

        String length = CmsUploadButton.formatBytes(m_contentLength);
        int fileCount = m_orderedFilenamesToUpload.size();
        m_bar.setValue(100);
        m_fileinfo.removeAllRows();
        m_fileinfo.setHTML(0, 0, "<b>" + Messages.get().key(Messages.GUI_UPLOAD_FINISH_UPLOADED_0) + "</b>");
        m_fileinfo.setText(
            0,
            1,
            Messages.get().key(
                Messages.GUI_UPLOAD_FINISH_UPLOADED_VALUE_4,
                new Integer(fileCount),
                new Integer(fileCount),
                getFileText(),
                length));
    }
799178
def stop(self):
        """"""
        if self._progressing:
            self._progressing = False
            self._thread.join()
1348951
def finish(type, name, path = Dir.pwd, optional_args = '')
      command(name, type, 'finish', path, optional_args)
    end
596461
@Override
    public void onTaskComplete() {
        progressBar.dismiss();
        progressBar = null;
        Toast.makeText(getActivity(), "Download complete!", Toast.LENGTH_LONG).show();
    }