Completes all breakpoints that have been active for too long.
484145
def CheckBreakpointsExpiration(self):
    """"""
    with self._lock:
      current_time = BreakpointsManager.GetCurrentTime()
      if self._next_expiration > current_time:
        return

      expired_breakpoints = []
      self._next_expiration = datetime.max
      for breakpoint in six.itervalues(self._active):
        expiration_time = breakpoint.GetExpirationTime()
        if expiration_time <= current_time:
          expired_breakpoints.append(breakpoint)
        else:
          self._next_expiration = min(self._next_expiration, expiration_time)

    for breakpoint in expired_breakpoints:
      breakpoint.ExpireBreakpoint()
926115
def disable_all_breakpoints(cls):
        
        for bp in cls.breakpoints_by_number:
            if bp:  # breakpoint #0 exists and is always None
                bp.enabled = False
        cls.update_active_breakpoint_flag()
        return
675680
public static function finish() {

        if(empty(self::$profiler) === false) {

            self::$profiler = array_merge([
                'elapsed'   =>  self::getTime(time() - self::$profiler['start']),
                'memory'    =>  self::getMemoryUsage(),
                'cpu'       =>  self::getUsageCPU(),
                'stack'     =>  self::getStackCalls()
            ], self::$profiler);

            unset(self::$profiler['start']);
        }
    }
1191347
def CompleteBreakpoint(self, breakpoint_id):
    
    with self._lock:
      self._completed.add(breakpoint_id)
      if breakpoint_id in self._active:
        self._active.pop(breakpoint_id).Clear()
656006
def clear_breakpoint(self, filename, lineno):
        """"""
        clear_breakpoint(filename, lineno)
        self.breakpoints_saved.emit()
        editorstack = self.get_current_editorstack()
        if editorstack is not None:
            index = self.is_file_opened(filename)
            if index is not None:
                editorstack.data[index].editor.debugger.toogle_breakpoint(
                        lineno)
673385
public function cleanup()
    {
        // unlock everything
        foreach ($this->locks as $lock) {
            flock($lock, LOCK_UN);
            fclose($lock);
        }

        $this->locks = [];
    }
1209674
def finalize(self):
        """"""
        if self.total_instances > 1:
            print('{} of {} instances contained dead code.'
                  .format(self.dead_code_instances, self.total_instances))
141708
void clear() {
    try (Connection conn = datasource.getConnection()) {
      context.get(conn).truncate(ZIPKIN_SPANS).execute();
      context.get(conn).truncate(ZIPKIN_ANNOTATIONS).execute();
      context.get(conn).truncate(ZIPKIN_DEPENDENCIES).execute();
    } catch (SQLException | RuntimeException e) {
      throw new AssertionError(e);
    }
  }
89227
void retainCompletedMigrations(Collection<MigrationInfo> migrations) {
        partitionServiceLock.lock();
        try {
            completedMigrations.retainAll(migrations);
        } finally {
            partitionServiceLock.unlock();
        }
    }
837210
@Override
    public void clear() {
        try {
            lockAllSegments();
            for (LinkedHashMapSegment<K, V> seg : segments) {
                seg.clear();
            }
        } finally {
            unlockAllSegments();
        }
    }
695236
def clear_break(
            self, filename, lineno=None, temporary=False, cond=None,
            funcname=None
    ):
        """"""
        log.info(
            'Removing break fn:%s lno:%s tmp:%s cond:%s fun:%s' %
            (filename, lineno, temporary, cond, funcname)
        )

        breakpoint = self.get_break(
            filename, lineno, temporary or False, cond, funcname
        )
        if temporary is None and breakpoint not in self.breakpoints:
            breakpoint = self.get_break(filename, lineno, True, cond, funcname)

        try:
            self.breakpoints.remove(breakpoint)
            log.info('Breakpoint %r removed' % breakpoint)
        except Exception:
            log.info('Breakpoint %r not removed: not found' % breakpoint)
1103969
public void clear() {
        this.setRemoteAddress(null).setLocalAddress(null).setFuture(null).setProviderSide(null)
            .setProviderInfo(null);
        this.attachments = new ConcurrentHashMap<String, Object>();
        this.stopWatch.reset();
    }
839347
function cleanup() {
      res.removeListener('finish', makePoint);
      res.removeListener('error', cleanup);
      res.removeListener('close', cleanup);
    }
497898
public Breakpoint clearBreakpoint(int bpno)
	{
		Breakpoint old = breakpoints.remove(bpno);

		if (old != null)
		{
			PStm stmt = findStatement(old.location.getFile(), old.location.getStartLine());

			if (stmt != null)
			{
				BreakpointManager.setBreakpoint(stmt, new Breakpoint(stmt.getLocation()));
			} else
			{
				PExp exp = findExpression(old.location.getFile(), old.location.getStartLine());
				assert exp != null : "Cannot locate old breakpoint?";
				BreakpointManager.setBreakpoint(exp, new Breakpoint(exp.getLocation()));
			}
		}

		return old; // null if not found
	}
782417
public static void reset() {
        getInstance().notifier.set(null);
        getInstance().concurrencyStrategy.set(null);
        getInstance().metricsPublisher.set(null);
        getInstance().propertiesFactory.set(null);
        getInstance().commandExecutionHook.set(null);
        HystrixMetricsPublisherFactory.reset();
    }
311674
def cleanup(self):
        
        self.lock.acquire()
        logger.debug('Acquired lock in cleanup for ' + str(self))
        self.children = [child for child in self.children if child.is_alive()]
        self.lock.release()
617153
public void clear() {
    ArrayList<Entry<K, V>> oldExclusives;
    ArrayList<Entry<K, V>> oldEntries;
    synchronized (this) {
      oldExclusives = mExclusiveEntries.clear();
      oldEntries = mCachedEntries.clear();
      makeOrphans(oldEntries);
    }
    maybeClose(oldEntries);
    maybeNotifyExclusiveEntryRemoval(oldExclusives);
    maybeUpdateCacheParams();
  }