diff options
Diffstat (limited to 'mu.arc')
-rw-r--r-- | mu.arc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mu.arc b/mu.arc index e100d089..14ed973d 100644 --- a/mu.arc +++ b/mu.arc @@ -329,11 +329,8 @@ ; detect deadlock: kill all sleeping routines when none can be woken (def update-scheduler-state () (when routine* -;? (prn routine*) +;? (prn "update scheduler state: " routine*) (if - empty.routine* - (do (trace "schedule" "done with routine") - (push routine* completed-routines*)) rep.routine*!sleep (do (trace "schedule" "pushing " top.routine*!fn-name " to sleep queue") ; keep the clock ticking at rep.routine*!running-since @@ -342,6 +339,9 @@ (do (trace "schedule" "done with dead routine " top.routine*!fn-name) ;? (tr rep.routine*) (push routine* completed-routines*)) + empty.routine* + (do (trace "schedule" "done with routine") + (push routine* completed-routines*)) (no rep.routine*!limit) (do (trace "schedule" "scheduling " top.routine*!fn-name " for further processing") (enq routine* running-routines*)) @@ -1461,6 +1461,7 @@ (while (in top.routine!fn-name 'read 'write) (pop-stack routine)) (wipe rep.routine!sleep) + (wipe rep.routine!error) (enq routine running-routines*)) (def dump (msg routine) |