@@ -840,7 +840,7 @@ reschedule simstate@SimState{ runqueue, threads,
840
840
-- When there is no current running thread but the runqueue is non-empty then
841
841
-- schedule the next one to run.
842
842
reschedule simstate@ SimState { runqueue, threads }
843
- | Just (Down tid, _, _, runqueue') <- PSQ. minView runqueue =
843
+ | Just (Down ! tid, _, _, runqueue') <- PSQ. minView runqueue =
844
844
invariant Nothing simstate $
845
845
846
846
let thread = threads Map. ! tid in
@@ -910,24 +910,24 @@ unblockThreads vClock wakeup simstate@SimState {runqueue, threads} =
910
910
where
911
911
-- can only unblock if the thread exists and is blocked (not running)
912
912
unblocked :: [Thread s a ]
913
- unblocked = [ thread
914
- | tid <- wakeup
915
- , thread <-
916
- case Map. lookup tid threads of
917
- Just Thread { threadDone = True } -> [ ]
918
- Just t@ Thread { threadBlocked = True } -> [t]
919
- _ -> [ ]
920
- ]
913
+ ! unblocked = [ thread
914
+ | tid <- wakeup
915
+ , thread <-
916
+ case Map. lookup tid threads of
917
+ Just Thread { threadDone = True } -> [ ]
918
+ Just t@ Thread { threadBlocked = True } -> [t]
919
+ _ -> [ ]
920
+ ]
921
921
922
922
unblockedIds :: [ThreadId ]
923
- unblockedIds = map threadId unblocked
923
+ ! unblockedIds = map threadId unblocked
924
924
925
925
-- and in which case we mark them as now running
926
- threads' = List. foldl'
927
- (flip (Map. adjust
928
- (\ t -> t { threadBlocked = False ,
929
- threadVClock = vClock `leastUpperBoundVClock` threadVClock t })))
930
- threads unblockedIds
926
+ ! threads' = List. foldl'
927
+ (flip (Map. adjust
928
+ (\ t -> t { threadBlocked = False ,
929
+ threadVClock = vClock `leastUpperBoundVClock` threadVClock t })))
930
+ threads unblockedIds
931
931
932
932
933
933
-- | Iterate through the control stack to find an enclosing exception handler
0 commit comments