mirror of
https://github.com/golang/go
synced 2024-11-21 12:04:41 -07:00
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
This commit is contained in:
parent
6c4645cffe
commit
aecf5033df
@ -270,8 +270,8 @@ before the <code>print</code>.
|
|||||||
<p>
|
<p>
|
||||||
If the channel were buffered (e.g., <code>c = make(chan int, 1)</code>)
|
If the channel were buffered (e.g., <code>c = make(chan int, 1)</code>)
|
||||||
then the program would not be guaranteed to print
|
then the program would not be guaranteed to print
|
||||||
<code>"hello, world"</code>. (It might print the empty string;
|
<code>"hello, world"</code>. (It might print the empty string,
|
||||||
it cannot print <code>"goodbye, universe"</code>, nor can it crash.)
|
crash, or do something else.)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3>Locks</h3>
|
<h3>Locks</h3>
|
||||||
|
Loading…
Reference in New Issue
Block a user