(self, env_fns)
:param env_fns: A list of thunks for generating environments
:param env_fns: A list of thunks for generating environments
: param env_fns : A list of thunks for generating environments
def __init__(self, env_fns):
        """
        :param env_fns: A list of thunks for generating environments
        """
        prototype_env = env_fns[0]() # Construct an env to extract action spaces
        self.action_space = prototype_env.action_space
        self.observation_space = prototype_env.observation_space

        self.remotes, self.work_remotes = zip(*[Pipe() for _ in range(len(env_fns))])
        self.ps = [Process(target=env_worker, args=(work_remote, CloudpickleWrapper(env_fn)))
            for (work_remote, env_fn) in zip(self.work_remotes, env_fns)]
        for p in self.ps:
            p.start()
def __init__ ( self , env_fns ) : prototype_env = env_fns [ 0 ] ( ) # Construct an env to extract action spaces self . action_space = prototype_env . action_space self . observation_space = prototype_env . observation_space self . remotes , self . work_remotes = zip ( * [ Pipe ( ) for _ in range ( len ( env_fns ) ) ] ) self . ps = [ Process ( target = env_worker , args = ( work_remote , CloudpickleWrapper ( env_fn ) ) ) for ( work_remote , env_fn ) in zip ( self . work_remotes , env_fns ) ] for p in self . ps : p . start ( )