mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-19 05:25:54 +00:00
Remove Python 2 compatibility in VectorEnv (#2034)
This commit is contained in:
@@ -68,12 +68,7 @@ class AsyncVectorEnv(VectorEnv):
|
||||
"""
|
||||
def __init__(self, env_fns, observation_space=None, action_space=None,
|
||||
shared_memory=True, copy=True, context=None, daemon=True, worker=None):
|
||||
try:
|
||||
ctx = mp.get_context(context)
|
||||
except AttributeError:
|
||||
logger.warn('Context switching for `multiprocessing` is not '
|
||||
'available in Python 2. Using the default context.')
|
||||
ctx = mp
|
||||
ctx = mp.get_context(context)
|
||||
self.env_fns = env_fns
|
||||
self.shared_memory = shared_memory
|
||||
self.copy = copy
|
||||
|
Reference in New Issue
Block a user