]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc: Don't imply incorrect guarantees about data races.
authorDavid Symonds <dsymonds@golang.org>
Mon, 10 Sep 2012 22:47:30 +0000 (08:47 +1000)
committerDavid Symonds <dsymonds@golang.org>
Mon, 10 Sep 2012 22:47:30 +0000 (08:47 +1000)
A race between
        a = "hello, world"
and
        print(a)
is not guaranteed to print either "hello, world" or "".
Its behaviour is undefined.

Fixes #4039.

R=rsc
CC=dvyukov, gobot, golang-dev, r
https://golang.org/cl/6489075

doc/go_mem.html

index ece230638e76fff100f745009b43ca509cfadd4b..0b73e43c4a946d0dcc56328a1095f9e9075d832b 100644 (file)
@@ -270,8 +270,8 @@ before the <code>print</code>.
 <p>
 If the channel were buffered (e.g., <code>c = make(chan int, 1)</code>)
 then the program would not be guaranteed to print
-<code>"hello, world"</code>.  (It might print the empty string;
-it cannot print <code>"goodbye, universe"</code>, nor can it crash.)
+<code>"hello, world"</code>.  (It might print the empty string,
+crash, or do something else.)
 </p>
 
 <h3>Locks</h3>