@@ -175,7 +175,7 @@ data TimerCompletionInfo s =
175
175
-- ^ `timeout` timer run by `ThreadId` which was assigned the given
176
176
-- `TimeoutId` (only used to report in a trace).
177
177
178
- type RunQueue = OrdPSQ (Down ThreadId ) (Down ThreadId ) ()
178
+ type RunQueue = OrdPSQ (Down ThreadId ) (Down ThreadId ) ()
179
179
type Timeouts s = OrdPSQ TimeoutId Time (TimerCompletionInfo s )
180
180
181
181
-- | Internal state.
@@ -601,7 +601,7 @@ schedule thread@Thread{
601
601
thread'' = Thread { threadId = tid'
602
602
, threadControl = ThreadControl (runIOSim a)
603
603
ForkFrame
604
- , threadStatus = ThreadRunning
604
+ , threadStatus = ThreadRunning
605
605
, threadMasking = threadMasking thread
606
606
, threadThrowTo = []
607
607
, threadClockId = threadClockId thread
@@ -1023,7 +1023,7 @@ reschedule simstate@SimState{ threads, timers, curTime = time, races } =
1023
1023
TimeoutFired -> error " MonadTimer(Sim): invariant violation"
1024
1024
TimeoutCancelled -> return ()
1025
1025
timeoutAction (TimerRegisterDelay var) = writeTVar var True
1026
- timeoutAction (TimerThreadDelay _ _) = return ()
1026
+ timeoutAction (TimerThreadDelay _ _) = return ()
1027
1027
timeoutAction (TimerTimeout _ _ _) = return ()
1028
1028
1029
1029
unblockThreads :: forall s a .
@@ -1105,7 +1105,7 @@ forkTimeoutInterruptThreads timeoutExpired simState =
1105
1105
where
1106
1106
-- we launch a thread responsible for throwing an AsyncCancelled exception
1107
1107
-- to the thread which timeout expired
1108
- throwToThread :: [(Thread s a , TMVar (IOSim s ) ThreadId )]
1108
+ throwToThread :: [(Thread s a , TMVar (IOSim s ) ThreadId )]
1109
1109
1110
1110
(simState', throwToThread) = List. mapAccumR fn simState timeoutExpired
1111
1111
where
@@ -1143,7 +1143,7 @@ forkTimeoutInterruptThreads timeoutExpired simState =
1143
1143
, lock
1144
1144
)
1145
1145
)
1146
-
1146
+
1147
1147
1148
1148
-- | Iterate through the control stack to find an enclosing exception handler
1149
1149
-- of the right type, or unwind all the way to the top level for the thread.
@@ -1249,10 +1249,10 @@ runSimTraceST mainAction = controlSimTraceST Nothing ControlDefault mainAction
1249
1249
controlSimTraceST :: Maybe Int -> ScheduleControl -> IOSim s a -> ST s (SimTrace a )
1250
1250
controlSimTraceST limit control mainAction =
1251
1251
SimPORTrace (curTime initialState)
1252
- (threadId mainThread)
1253
- 0
1254
- (threadLabel mainThread)
1255
- (EventSimStart control)
1252
+ (threadId mainThread)
1253
+ 0
1254
+ (threadLabel mainThread)
1255
+ (EventSimStart control)
1256
1256
<$> schedule mainThread initialState { control = control,
1257
1257
control0 = control,
1258
1258
perStepTimeLimit = limit
@@ -1662,6 +1662,7 @@ racingSteps s s' =
1662
1662
)
1663
1663
where throwsTo s1 s2 =
1664
1664
stepThreadId s2 `elem` effectThrows (stepEffect s1)
1665
+ -- `throwTo` races with any other effect
1665
1666
&& stepEffect s2 /= mempty
1666
1667
1667
1668
currentStep :: Thread s a -> Step
@@ -1822,7 +1823,7 @@ updateRaces newStep@Step{ stepThreadId = tid, stepEffect = newEffect }
1822
1823
}
1823
1824
1824
1825
activeRaces' :: [StepInfo ]
1825
- ! activeRaces' =
1826
+ ! activeRaces' =
1826
1827
case newStepInfo of
1827
1828
Nothing -> updateStepInfo <$> activeRaces
1828
1829
Just si -> si : (updateStepInfo <$> activeRaces)
0 commit comments