Commit aecf5033 authored by David Symonds's avatar David Symonds

doc: Don't imply incorrect guarantees about data races.

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
parent 6c4645cf
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment