def stop(self):
        """
        Shutdown the threads in the threadpool.
        """
        self.joined = True
        self.started = False
        self._team.quit()
        for thread in self.threads:
            thread.join()

        Shutdown the threads in the threadpool.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/threadpool.py