@@ -207,7 +207,7 @@ schedule !thread@Thread{
207
207
208
208
ForkFrame -> do
209
209
-- this thread is done
210
- trace <- deschedule Terminated thread simstate
210
+ ! trace <- deschedule Terminated thread simstate
211
211
return $ SimTrace time tid tlbl EventThreadFinished
212
212
$ SimTrace time tid tlbl (EventDeschedule Terminated )
213
213
$ trace
@@ -217,7 +217,7 @@ schedule !thread@Thread{
217
217
let thread' = thread { threadControl = ThreadControl (k x) ctl'
218
218
, threadMasking = maskst' }
219
219
-- but if we're now unmasked, check for any pending async exceptions
220
- trace <- deschedule Interruptable thread' simstate
220
+ ! trace <- deschedule Interruptable thread' simstate
221
221
return $ SimTrace time tid tlbl (EventMask maskst')
222
222
$ SimTrace time tid tlbl (EventDeschedule Interruptable )
223
223
$ trace
@@ -245,7 +245,7 @@ schedule !thread@Thread{
245
245
246
246
| otherwise -> do
247
247
-- An unhandled exception in any other thread terminates the thread
248
- trace <- deschedule Terminated thread simstate
248
+ ! trace <- deschedule Terminated thread simstate
249
249
return $ SimTrace time tid tlbl (EventThrow e)
250
250
$ SimTrace time tid tlbl (EventThreadUnhandled e)
251
251
$ SimTrace time tid tlbl (EventDeschedule Terminated )
@@ -426,7 +426,7 @@ schedule !thread@Thread{
426
426
-- For testing, we should have a more sophisticated policy to show
427
427
-- that algorithms are not sensitive to the exact policy, so long
428
428
-- as it is a fair policy (all runnable threads eventually run).
429
- trace <- deschedule Yield thread' simstate' { nextVid = nextVid' }
429
+ ! trace <- deschedule Yield thread' simstate' { nextVid = nextVid' }
430
430
return $ SimTrace time tid tlbl (EventTxCommitted
431
431
written' created' Nothing )
432
432
$ traceMany
@@ -447,13 +447,13 @@ schedule !thread@Thread{
447
447
StmTxAborted _read e -> do
448
448
-- schedule this thread to immediately raise the exception
449
449
let thread' = thread { threadControl = ThreadControl (Throw e) ctl }
450
- trace <- schedule thread' simstate
450
+ ! trace <- schedule thread' simstate
451
451
return $ SimTrace time tid tlbl (EventTxAborted Nothing ) trace
452
452
453
453
StmTxBlocked read -> do
454
454
! _ <- mapM_ (\ (SomeTVar tvar) -> blockThreadOnTVar tid tvar) read
455
455
vids <- traverse (\ (SomeTVar tvar) -> labelledTVarId tvar) read
456
- trace <- deschedule Blocked thread simstate
456
+ ! trace <- deschedule Blocked thread simstate
457
457
return $ SimTrace time tid tlbl (EventTxBlocked vids Nothing )
458
458
$ SimTrace time tid tlbl (EventDeschedule Blocked )
459
459
$ trace
@@ -481,7 +481,7 @@ schedule !thread@Thread{
481
481
(runIOSim action')
482
482
(MaskFrame k maskst ctl)
483
483
, threadMasking = maskst' }
484
- trace <-
484
+ ! trace <-
485
485
case maskst' of
486
486
-- If we're now unmasked then check for any pending async exceptions
487
487
Unmasked -> SimTrace time tid tlbl (EventDeschedule Interruptable )
@@ -508,7 +508,7 @@ schedule !thread@Thread{
508
508
-- exception and the source thread id to the pending async exceptions.
509
509
let adjustTarget t = t { threadThrowTo = (e, Labelled tid tlbl) : threadThrowTo t }
510
510
threads' = Map. adjust adjustTarget tid' threads
511
- trace <- deschedule Blocked thread' simstate { threads = threads' }
511
+ ! trace <- deschedule Blocked thread' simstate { threads = threads' }
512
512
return $ SimTrace time tid tlbl (EventThrowTo e tid')
513
513
$ SimTrace time tid tlbl EventThrowToBlocked
514
514
$ SimTrace time tid tlbl (EventDeschedule Blocked )
@@ -620,7 +620,7 @@ deschedule Terminated !thread !simstate@SimState{ curTime = time, threads } = do
620
620
let wakeup = map (l_labelled . snd ) (reverse (threadThrowTo thread))
621
621
(unblocked,
622
622
simstate') = unblockThreads wakeup simstate
623
- trace <- reschedule simstate'
623
+ ! trace <- reschedule simstate'
624
624
return $ traceMany
625
625
[ (time, tid', tlbl', EventThrowToWakeup )
626
626
| tid' <- unblocked
0 commit comments