Don't crash if a process yields and gets killed before it is next scheduled
This commit is contained in:
parent
75d40c7abc
commit
ee1ec3ceda
6
os2.rkt
6
os2.rkt
|
@ -287,7 +287,11 @@
|
|||
(let-values (((transformed-preaction state) (transform-meta-action pid preaction state)))
|
||||
(loop rest state (cons transformed-preaction outbound-actions)))]
|
||||
[(yield k)
|
||||
(loop rest (run-ready state pid k) outbound-actions)]
|
||||
(loop rest
|
||||
(if (hash-has-key? (vm-processes state) pid)
|
||||
(run-ready state pid k)
|
||||
state)
|
||||
outbound-actions)]
|
||||
[preaction
|
||||
(let-values (((new-outbound-actions-rev state) (perform-action pid preaction state)))
|
||||
(loop rest state (append new-outbound-actions-rev outbound-actions)))])])))
|
||||
|
|
Loading…
Reference in New Issue