File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
io-sim/src/Control/Monad/IOSimPOR Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -826,6 +826,21 @@ threadInterruptible thread =
826826 | otherwise -> False
827827 MaskedUninterruptible -> False
828828
829+
830+ -- | Deschedule a thread.
831+ --
832+ -- A thread is descheduled, which marks a boundary of a `Step` when:
833+ --
834+ -- * forking a new thread
835+ -- * thread termination
836+ -- * setting the masking state to interruptible
837+ -- * popping masking frame (which resets masking state)
838+ -- * starting or cancelling a timeout
839+ -- * thread delays
840+ -- * on committed or blocked, but not aborted STM transactions
841+ -- * on blocking or non-blocking `throwTo`
842+ -- * unhandled exception in a (non-main) thread
843+ --
829844deschedule :: Deschedule -> Thread s a -> SimState s a -> ST s (SimTrace a )
830845
831846deschedule Yield thread@ Thread { threadId = tid,
Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ instance Show ScheduleMod where
176176-- Steps
177177--
178178
179+ -- | A unit of execution. `deschedule` marks a boundary of a `Step`, see it's
180+ -- haddocks.
181+ --
179182data Step = Step {
180183 stepThreadId :: ! IOSimThreadId ,
181184 stepStep :: ! Int ,
You can’t perform that action at this time.
0 commit comments