def stop(self):
        if not self.started:
            raise ActivityException(desc='Cannot call stop when activity is '
                                    'not started or has been stopped already.')

        LOG.debug('Stopping activity %s.', self.name)
        self._stop_timers()
        self._stop_child_activities()
        self._stop_child_threads()
        self._close_asso_sockets()

        # Setup activity for start again.
        self._started = False
        self._asso_socket_map = weakref.WeakValueDictionary()
        self._child_activity_map = weakref.WeakValueDictionary()
        self._child_thread_map = weakref.WeakValueDictionary()
        self._timers = weakref.WeakValueDictionary()
        LOG.debug('Stopping activity %s finished.', self.name)
Remove a game from the database.
dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/bgp/base.py/Activity.stop--crossover with--dataset/ETHPy150Open Morgawr/gogonlinux/gog_utils/gog_db.py/GogDatabase.remove_game