Skip to content

Commit de23957

Browse files
committed
Reduce the maxwait value for Step 5 to trigger calls to the tardy handler often, and clarify Exercise 1 in Step 5.
1 parent 4310b61 commit de23957

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

05-hybrid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ See [`src/Step5_Hybrid.lf`](src/Step5_Hybrid.lf).
9898

9999
## Exercises
100100

101-
1. Add `after 50 ms` to the `true_balance -> QuickDispatch.true_balance` connection. Does the tardy handler fire more often? How does the `after` delay shift the point where the fast-path estimate gets corrected?
101+
1. Add `after 10 ms` to the `GridManager.out -> QuickDispatch.true_balance` connection. Does the tardy handler fire more often? How does the `after` delay shift the point where the fast-path estimate gets corrected?
102102

103103
2. Add a `state fault_count: int = 0` to `QuickDispatch` and increment it in the `tardy` handler. Print the running count after each tardy event. Run with `@maxwait(10 ms)` against a 75 ms simulated delay. How quickly does the fault count grow?
104104

fig/Step5_Hybrid.svg

Lines changed: 1 addition & 1 deletion
Loading

src/Step5_Hybrid.lf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ federated reactor {
128128
@maxwait(forever)
129129
gm2 = new GridManager()
130130

131-
@maxwait(30 ms)
131+
@maxwait(5 ms)
132132
qd1 = new QuickDispatch()
133133
// California fast-path handler
134-
@maxwait(30 ms)
134+
@maxwait(5 ms)
135135
qd2 = new QuickDispatch()
136136

137137
// New York fast-path handler

0 commit comments

Comments
 (0)