Finalizes the target, exiting for us back to the original shell
		and performing any repository work required.
969630
def finalize(self, shutit):
		
		# Finish with the target
		target_child_pexpect_session = shutit.get_shutit_pexpect_session_from_id('target_child')
		assert not target_child_pexpect_session.sendline(ShutItSendSpec(target_child_pexpect_session,'exit',ignore_background=True)), shutit_util.print_debug()
		return True
1064997
def finalize(self):
        """"""
        # Merge all the out_DDB files found in work.outdir.
        ddb_files = list(filter(None, [work.outdir.has_abiext("DDB") for work in self]))

        # Final DDB file will be produced in the outdir of the work.
        out_ddb = self.outdir.path_in("out_DDB")
        desc = "DDB file merged by %s on %s" % (self.__class__.__name__, time.asctime())

        mrgddb = wrappers.Mrgddb(manager=self.manager, verbose=0)
        mrgddb.merge(self.outdir.path, ddb_files, out_ddb=out_ddb, description=desc)
        print("Final DDB file available at %s" % out_ddb)

        # Call the method of the super class.
        retcode = super().finalize()
        return retcode
267469
def finalize_builder(tc)
      tc.build_operation[:builder].finalize(
        tc.build_operation.merge(
          command_status: tc.thread.value,
          tc: tc))
    end
1242934
public void kill() {
    if (isComplete() || failed) {
      return;
    }
    this.failed = true;
    killed = true;
    this.execFinishTime = JobTracker.getClock().getTime();
    recomputeProgress();
  }
1030593
def finalize(self, result):
        """"""
        sys.stderr = self._stderr.pop()
        sys.stdout = self._stdout.pop()
        pdb.set_trace = self._set_trace.pop()
        pdb.Pdb.cmdloop = self._cmdloop.pop()
975986
def finalize(self):
        
        if self.finalized:
            self.history.warning("Calling finalize on an already finalized flow.")
            return 1

        self.history.info("Calling flow.finalize.")
        self.finalized = True

        if self.has_db:
            self.history.info("Saving results in database.")
            try:
                self.flow.db_insert()
                self.finalized = True
            except Exception:
                 logger.critical("MongoDb insertion failed.")
                 return 2

        # Here we remove the big output files if we have the garbage collector
        # and the policy is set to "flow."
        if self.gc is not None and self.gc.policy == "flow":
            self.history.info("gc.policy set to flow. Will clean task output files.")
            for task in self.iflat_tasks():
                task.clean_output_files()

        return 0
1010829
def finalize_target(self):
		
		shutit_global.shutit_global_object.yield_to_draw()
		self.pause_point('\nFinalizing the target module (' + self.shutit_main_dir + '/shutit_setup.py)', print_input=False, level=3)
		# Can assume conn_module exists at this point
		for mod in self.conn_modules:
			if mod.module_id == self.build['conn_module']:
				conn_module = mod
				break
		conn_module.finalize(self)
10433
public function finish()
    {
        $this->resolveRelations();
        $this->writeXmlFiles();
        $this->createTables();
        $this->import();
        $this->writeExtensionIni();
    }
976509
def do_finalize():
	
	def _finalize(shutit):
		# Stop all the modules
		shutit.stop_all()
		# Finalize in reverse order
		shutit.log('PHASE: finalizing object ' + str(shutit), level=logging.DEBUG)
		# Login at least once to get the exports.
		for module_id in shutit.module_ids(rev=True):
			# Only finalize if it's thought to be installed.
			if shutit.is_installed(shutit.shutit_map[module_id]):
				shutit.login(prompt_prefix=module_id,command=shutit_global.shutit_global_object.bash_startup_command,echo=False)
				if not shutit.shutit_map[module_id].finalize(shutit):
					shutit.fail(module_id + ' failed on finalize', shutit_pexpect_child=shutit.get_shutit_pexpect_session_from_id('target_child').pexpect_child) # pragma: no cover
				shutit.logout(echo=False)
		for fshutit in shutit_global.shutit_global_object.shutit_objects:
			_finalize(fshutit)
731538
def finish(self):
        
        # Update the last_offset in the mar header
        self.write_header()
        # Write out the index of contents
        self.write_index()

        if not self.use_old_format:
            # Refresh the signature
            sigs = self.calculate_signatures()
            self.write_signatures(sigs)
203185
public void finish() {
        if (mAccountAuthenticatorResponse != null) {
            // send the result bundle back if set, otherwise send an error.
            if (mResultBundle != null) {
                mAccountAuthenticatorResponse.onResult(mResultBundle);
            } else {
                mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED,
                        "canceled");
            }
            mAccountAuthenticatorResponse = null;
        }
        super.finish();
    }
215963
def standard_finalize(options)
      if options[:command_status]
        target, sources, cache, env = options.values_at(:target, :sources, :cache, :env)
        cache.register_build(target, options[:tc].command, sources, env)
        target
      end
    end
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;
            }
        }
    }
1199417
public function finalize()
    {
        @flock($this->getFileResource(), LOCK_UN);
        @fclose($this->getFileResource());
        @unlink($this->getFileName());
    }
1049663
public function finalize()
    {
        if (!$this->finalized) {
            foreach ($this->getRoutes() as $route) {
                $route->finalize();
                $this->addRoute($route->getMethods(), $route->getPattern(), [$route, 'run']);
            }
            $this->finalized = true;
        }
    }
835119
public synchronized void finish() {
    if (!this.isInitialized()) {
      throw new IllegalStateException("Torrent not yet initialized!");
    }

    if (!this.isComplete()) {
      throw new IllegalStateException("Torrent download is not complete!");
    }

    eventDispatcher.multicaster().downloadComplete();
    setClientState(ClientState.SEEDING);
  }
1006043
def finalize(self):
        
        self.library.finalize.argtypes = []
        self.library.finalize.restype = c_int
        ierr = wrap(self.library.finalize)()
        # always go back to previous directory
        logger.info('cd {}'.format(self.original_dir))
        # This one doesn't work.
        os.chdir(self.original_dir)
        if ierr:
            errormsg = "Finalizing model {engine} failed with exit code {code}"
            raise RuntimeError(errormsg.format(engine=self.engine, code=ierr))