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 =
826
826
| otherwise -> False
827
827
MaskedUninterruptible -> False
828
828
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
+ --
829
844
deschedule :: Deschedule -> Thread s a -> SimState s a -> ST s (SimTrace a )
830
845
831
846
deschedule Yield thread@ Thread { threadId = tid,
Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ instance Show ScheduleMod where
176
176
-- Steps
177
177
--
178
178
179
+ -- | A unit of execution. `deschedule` marks a boundary of a `Step`, see it's
180
+ -- haddocks.
181
+ --
179
182
data Step = Step {
180
183
stepThreadId :: ! IOSimThreadId ,
181
184
stepStep :: ! Int ,
You can’t perform that action at this time.
0 commit comments