by Jonathan Bright | Nov 8, 2026 | Tutorials
A periodic loop can start a second job while the first is still unfinished, even when it awaits every timer tick. Await the job itself before requesting the next tick. This tutorial makes the overlap reproducible, then checks a sequential loop through normal work,...
by Jonathan Bright | Nov 6, 2026 | Tutorials
A counter can pass a test when two workers happen to run one after another and still lose an update when their reads overlap. Make that difference reproducible by putting a test barrier between the read and the write. Then replace the whole update with an atomic...
by Jonathan Bright | Nov 6, 2026 | Tutorials
A locked hatch is both an exit and something you can use. A chest holds objects but does not lead anywhere. Modeling those abilities separately lets the command loop ask what an object can do without maintaining a different branch for every concrete class. Build a...
by Jonathan Bright | Nov 6, 2026 | Tutorials
Adding WithCancellation to an await foreach loop can still leave an async stream producing items after cancellation. The consumer supplies a token, but the iterator must receive it and use it where work waits. This tutorial reproduces that gap with a finite stream,...
by Jonathan Bright | Nov 5, 2026 | Tutorials
A rule table is easier to trust when every cell is checked. This console tutorial scores Rock, Paper, Scissors, Lizard, Spock with one switch expression over the pair of moves, then checks all 25 possible rounds. The result is always from the player’s...