File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -745,8 +745,17 @@ data StmStack s b a where
745
745
---
746
746
747
747
data ScheduleControl = ControlDefault
748
+ -- ^ default scheduling mode
748
749
| ControlAwait [ScheduleMod ]
750
+ -- ^ if the current control is 'ControlAwait', the normal
751
+ -- scheduling will proceed, until the thread found in the
752
+ -- first 'ScheduleMod' reaches the given step. At this
753
+ -- point the thread is put to sleep, until after all the
754
+ -- steps are followed.
749
755
| ControlFollow [StepId ] [ScheduleMod ]
756
+ -- ^ follow the steps then continue with schedule
757
+ -- modifications. This control is set by 'followControl'
758
+ -- when 'controlTargets' returns true.
750
759
deriving (Eq , Ord , Show )
751
760
752
761
data ScheduleMod = ScheduleMod {
Original file line number Diff line number Diff line change @@ -1577,7 +1577,11 @@ extendScheduleControl' (ControlAwait mods) m =
1577
1577
if isUndo
1578
1578
then ControlAwait mods -- reject this mod... it's undoing a previous one
1579
1579
else ControlAwait (take common mods++ [m''])
1580
- extendScheduleControl' ControlFollow {} ScheduleMod {} = error " Impossible: extendScheduleControl' ControlFollow{} ScheduleMod{}"
1580
+ extendScheduleControl' ControlFollow {} ScheduleMod {} =
1581
+ -- note: this case is impossible, since `extendScheduleControl'` first
1582
+ -- argument is either the initial `ControlDefault` or a result of calling
1583
+ -- `extendScheduleControl'` itself.
1584
+ error " Impossible: extendScheduleControl' ControlFollow{} ScheduleMod{}"
1581
1585
1582
1586
extendScheduleControl :: ScheduleControl -> ScheduleMod -> ScheduleControl
1583
1587
extendScheduleControl control m =
You can’t perform that action at this time.
0 commit comments