Remove all pending returns that are related to the current job.
188799
def _remove_pending_return(self, job, pending_returns):
        

        # Build the tuples that we want to remove from the dict fake_func_retn_exits
        tpls_to_remove = [ ]
        call_stack_copy = job.call_stack_copy()
        while call_stack_copy.current_return_target is not None:
            ret_target = call_stack_copy.current_return_target
            # Remove the current call stack frame
            call_stack_copy = call_stack_copy.ret(ret_target)
            call_stack_suffix = call_stack_copy.stack_suffix(self._context_sensitivity_level)
            tpl = call_stack_suffix + (ret_target,)
            tpls_to_remove.append(tpl)

        # Remove those tuples from the dict
        for tpl in tpls_to_remove:
            if tpl in pending_returns:
                del pending_returns[tpl]
                l.debug("Removed (%s) from FakeExits dict.",
                        ",".join([hex(i) if i is not None else 'None' for i in tpl]))
572458
private void cleanup(JobID jobId) {
		if (!lru.contains(jobId)) {
			lru.addFirst(jobId);
		}
		if (lru.size() > this.maxEntries) {
			JobID toRemove = lru.removeLast();
			this.jobAccumulators.remove(toRemove);
		}
	}
769021
public function removeAll()
    {
        foreach ($this->handles as $transaction) {
            $ch = $this->handles[$transaction];
            curl_multi_remove_handle($this->multi, $ch);
            curl_close($ch);
            unset($this->handles[$transaction]);
        }
    }
1068309
public function cleanup()
    {
        $this->listeners = [];
        $this->results = [];
        $this->jobs = [];
        $this->more = null;
    }
1096115
def clear(self):
        
        self.reference = None
        self._pending_ref = None
        super(SimpleDependency, self).clear()
291657
public void cleanup ()
    {
        // tell any pending object subscribers that they're not getting their bits
        for (PendingRequest<?> req : _penders.values()) {
            for (Subscriber<?> sub : req.targets) {
                sub.requestFailed(req.oid, new ObjectAccessException("Client connection closed"));
            }
        }
        _penders.clear();
        _flusher.cancel();
        _flushes.clear();
        _dead.clear();
        _client.getRunQueue().postRunnable(new Runnable() {
            public void run () {
                _ocache.clear();
            }
        });
    }
460697
def clear_worker_output(self):
        """"""
        
        print 'Dropping all of the worker output collections... Whee!'
        # Get all the collections in the workbench database
        all_c = self.database.collection_names()

        # Remove collections that we don't want to cap
        try:
            all_c.remove('system.indexes')
            all_c.remove('fs.chunks')
            all_c.remove('fs.files')
            all_c.remove('sample_set')
            all_c.remove('tags')
            all_c.remove(self.sample_collection)
        except ValueError:
            print 'Catching a benign exception thats expected...'

        for collection in all_c:
            self.database.drop_collection(collection)
989947
private void cleanup() {
        StatsDataReference ref = null;
        while ((ref = (StatsDataReference) statisticsReferenceQueue.poll()) != null) {
            StatsData oldStats = null;
            StatsData updatedStats = null;
            do {
                oldStats = terminatedThreadStats.get();
                updatedStats = aggregateStats(oldStats, ref.statsData);
            } while (!terminatedThreadStats.compareAndSet(oldStats, updatedStats));
            allReferences.remove(ref);
        }
    }
488285
public function clean()
    {
        $jobFiles = glob($this->getLocation() . '*.js');
        foreach ($jobFiles as $file) {
            unlink($file);
        }
    }
871255
public function cleanUp()
    {
        // create a separate queue for each priority
        foreach (PriorityKeys::getAll() as $priorityKey) {
            $this->workers[$this->uniqueWorkerName($priorityKey)]->stop();
        }
    }
830818
def clear(self):
        """"""
        if hasattr(self, '_bytes_012'):
            self._bytes_012.fill(0)
            self._bytes_345.fill(0)
        self._text_lines = [] * self._n_rows
        self._pending_writes = []
1035279
def clear_jobs():
    '''
    '''
    if not is_authorized():
        return json.dumps({'error': 'not authorized'}), 403, headers

    days = flask.request.args.get('days', None)
    return _clear_jobs(days)
1255907
def clear(self, results=True, errors=True):
        '''
        
        '''
        if results:
            self.results = []
        if errors:
            self.errors = []
797132
def clear_cache_for(*paths)
      return unless Lacquer.configuration.enable_cache
      case Lacquer.configuration.job_backend
      when :delayed_job
        require 'lacquer/delayed_job_job'
        Delayed::Job.enqueue(Lacquer::DelayedJobJob.new(paths))
      when :resque
        require 'lacquer/resque_job'
        Resque.enqueue(Lacquer::ResqueJob, paths)
      when :sidekiq
        require 'lacquer/sidekiq_worker'
        Lacquer::SidekiqWorker.perform_async(paths)
      when :none
        Varnish.new.purge(*paths)
      end
    end
1278926
def stop(self):
        """"""
        if self.running and self.num_workers:
            for worker in self.workers:
                self.queue.put(None)
            for worker in self.workers:
                worker.join()
            # Free up references held by workers
            del self.workers[:]
            self.queue.join()
        self.running = False
1123763
def clean_old_jobs():
    '''
    
    '''
    for returner_ in __opts__[CONFIG_KEY]:
        fstr = '{0}.clean_old_jobs'.format(returner_)
        if fstr in _mminion().returners:
            _mminion().returners[fstr]()
1170753
def clear(self):
        """"""
        with self.lock:
            for filehandle, refcount in list(self.files.items()):
                if refcount == 0:
                    filehandle.close()
                    del self.files[filehandle]
                    del self.past[self.past.index(filehandle)]