From 279163e3b057ed01c08184b6517ad5355bcbb215 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Mon, 22 Aug 2022 05:58:10 -0700 Subject: [PATCH] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 1bf00e9..0402abd 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,11 @@ Some of the examples demonstrate concurrent code which has a non-deterministic execution order. It depends on how the Go runtime schedules its goroutines and may vary by operating system, CPU architecture, or even Go version. +Similarly, examples that iterate over maps may produce items in a different order +from what you're getting on your machine. This is because the order of iteration +over maps in Go is [not specified and is not guaranteed to be the same from one +iteration to the next.](https://go.dev/ref/spec#RangeClause). + It doesn't mean anything is wrong with the example. Typically the code in these examples will be insensitive to the actual order of the output; if the code is sensitive to the order - that's probably a bug - so feel free to report it.