Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "adds explicit killing of workers" #6

Merged
merged 1 commit into from
Nov 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions torch_ac/utils/penv.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ def worker(conn, env):
elif cmd == "reset":
obs = env.reset()
conn.send(obs)
elif cmd == "kill":
return
else:
raise NotImplementedError

Expand All @@ -36,10 +34,6 @@ def __init__(self, envs):
p.start()
remote.close()

def __del__(self):
for local in self.locals:
local.send(("kill", None))

def reset(self):
for local in self.locals:
local.send(("reset", None))
Expand Down