def __init__(self, env_runners, maximum_staleness):
        """
        Args:
            env_runners (list[EnvRunner]):
            maximum_staleness (int): when >1 environments run in parallel,
                the actual stepping of an environment may happen several steps
                after calls to `EnvRunnerManager.step()`, in order to achieve better throughput.
        """
        assert len(env_runners) > 0
        self._runners = env_runners

        if len(self._runners) > 1:
            # Only use threads when having >1 runners.
            self._populate_job_queue = queue.Queue(maxsize=maximum_staleness)
            self._threads = [self._create_simulator_thread(i) for i in range(len(self._runners))]
            for t in self._threads:
                t.start()

        Args:
            env_runners (list[EnvRunner]):
            maximum_staleness (int): when >1 environments run in parallel,
                the actual stepping of an environment may happen several steps
                after calls to `EnvRunnerManager.step()`, in order to achieve better throughput.
        
examples/DeepQNetwork/expreplay.py