|
|
|
|
|
by ljm
439 days ago
|
|
I think #633 must be a typo, or just a fumbled explanation. "We might expect this code to print 123 in no particular order" should really say "exactly" or "in order", since it's proved in the next paragraph to be inconsistent. And that would be the layman's explanation of concurrency resulting in things added sequentially happening out of order. And assuming FIFO on async execution, akin to running everything in series, is probably the first mistake anyone will make when they encounter concurrency for the first time. |
|
[1]: https://go.dev/blog/loopvar-preview