News for hackers. Stuff that matters.
Re:So, I Wrote a Book: The Story Behind “100 Go Mistakes and... by kbolino on Friday April 11, 2025 @09:04AM (#43653314)
It was definitely 1. There were ways to demonstrate the issue without involving goroutines, such as by creating a list of closures in a loop, one at each iteration, and then invoking them synchronously after the loop exits. They would all have the same (in this case, final) value of i.

There are no comments on this comment yet.