def stop(self, blocking=True):
        self.stopping = True

        # Trigger stop of all plugins
        for plugin in self.plugins.values():
            if plugin.current_run:
                plugin.current_run.stop()
                plugin.current_run.terminate()

        # Wait until all plugins are stopped
        if blocking:
            plugins_left = self.plugins.keys()
            plugins_left_cnt = len(plugins_left)
            while plugins_left:
                plugins_left = []
                for name, plugin in self.plugins.iteritems():
                    if not plugin.current_run:
                        continue
                    if plugin.current_run.is_alive():
                        plugins_left.append(name)
                    else:
                        plugin.current_run.join()
                if plugins_left:
                    # Print info only if number of left plugins changed
                    if len(plugins_left) != plugins_left_cnt:
                        lg.info("Waiting for %s plugins to shutdown: %s" % (len(plugins_left), ','.join(plugins_left)))
                    plugins_left_cnt = len(plugins_left)
                    time.sleep(0.5)
Stop all plugins
dataset/ETHPy150Open gooddata/smoker/smoker/server/plugins/__init__.py/PluginManager.stop