Skip to content

Commit cde3cdd

Browse files
committed
describe the graph. and include a mermaid rendering of it.
1 parent 5f088e6 commit cde3cdd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/vision/shiny_future/barbara_makes_a_wish.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,14 @@ Barbara types capital `P`. The terminal switches to "problem view," which shows
8989

9090
The screen also says "hit `D` to generate a graphviz `.dot` file to disk describing the cycle."
9191

92-
Barbara hits `D` and stares at the resulting graph.
92+
Barbara hits `D` and stares at the resulting graph, which shows a single circle (labelled "task"), and an arc to a box (labelled "prototype_channel"), and an arc from that box back to the circle. The arc from the circle to the box is labelled `send: waiting on channel capacity`, and the arc from the box to the circle is labelled "sole consumer (mpsc channel)".
93+
94+
```mermaid
95+
graph TD
96+
task -- send: waiting on channel capacity --> prototype_channel
97+
prototype_channel -- "sole receiver (mpsc channel)" --> task
98+
task((task))
99+
```
93100

94101
Barbara suddenly realizes her mistake: She had constructed a single task that was sometimes enqueuing work (by sending messages on the channel), and sometimes dequeuing work, but she had not put any controls into place to ensure that the dequeuing (via `recv`) would get prioritized as the channel filled up.
95102

0 commit comments

Comments
 (0)