code: def destroy(self, folder=None, as_coro=False):
          
          async def _destroy(folder):
              ret = self.save_info(folder)
              await self.stop_slaves()
              # Terminate and join the process pool when we are destroyed.
              # Do not wait for unfinished processed with pool.close(),
              # the slaves should be anyway already stopped.
              if self._pool is not None:
                  self._pool.terminate()
                  self._pool.join()
              await self._env.shutdown(as_coro=True)
              return ret
  
          return run_or_coro(_destroy(folder), as_coro)
docs: Destroy the multiprocessing environment and its slave environments.