Skip to content

Commit 742f4de

Browse files
committed
io-sim: backport masking state fix
Apply the fix from the commit 69d793a73 to `IOSimPOR`.
1 parent ceb048a commit 742f4de

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

io-sim/src/Control/Monad/IOSimPOR/Internal.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,7 @@ schedule thread@Thread{
591591
ThrowTo e tid' _ | tid' == tid -> do
592592
-- Throw to ourself is equivalent to a synchronous throw,
593593
-- and works irrespective of masking state since it does not block.
594-
let thread' = thread { threadControl = ThreadControl (Throw e) ctl
595-
, threadMasking = MaskedInterruptible }
594+
let thread' = thread { threadControl = ThreadControl (Throw e) ctl }
596595
trace <- schedule thread' simstate
597596
return (SimTrace time tid tlbl (EventThrowTo e tid) trace)
598597

@@ -631,7 +630,6 @@ schedule thread@Thread{
631630
threadVClock = vClock' } =
632631
t { threadControl = ThreadControl (Throw e) ctl'
633632
, threadBlocked = False
634-
, threadMasking = MaskedInterruptible
635633
, threadVClock = vClock' `leastUpperBoundVClock` vClock }
636634
simstate'@SimState { threads = threads' }
637635
= snd (unblockThreads vClock [tid'] simstate)

0 commit comments

Comments
 (0)