Farama-Foundation / Miniworld

Simple and easily configurable 3D FPS-game-like environments for reinforcement learning
http://miniworld.farama.org/
Apache License 2.0
694 stars 129 forks source link

wrap write to ObjMesh.cache in a Lock #50

Closed ethanabrooks closed 2 years ago

ethanabrooks commented 2 years ago

I am suggesting adding a lock here because otherwise there is a race condition on ObjMesh.cache when using gym-miniworld environments in a parallel environments setting, e.g. SubprocVecEnv.

ethanabrooks commented 2 years ago

Actually it looks like python just gives each process a separate copy of the cache. My mistake!