back.pysim: fix handling of process termination.

This commit is contained in:
whitequark 2018-12-13 18:17:58 +00:00
parent fb27c2520b
commit 6a4004ef8d
2 changed files with 13 additions and 3 deletions

View file

@ -320,8 +320,7 @@ class Simulator:
stmt = proc.send(None)
except StopIteration:
self._processes.remove(proc)
self._passive.remove(proc)
self._suspended.remove(proc)
self._passive.discard(proc)
return
if isinstance(stmt, Delay):