]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go_mem: init-created goroutine behavior changes for Go 1
authorShenghou Ma <minux.ma@gmail.com>
Wed, 7 Mar 2012 19:56:31 +0000 (03:56 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Wed, 7 Mar 2012 19:56:31 +0000 (03:56 +0800)
        They can start execution even before all init functions end.

R=rsc, r, adg
CC=golang-dev
https://golang.org/cl/5732061

doc/go_mem.html

index a00324158112e6c649a9cdb58f2b9f4f16254a5d..1d45dceb6270bd623e3051e14babf7755e3a5677 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Memory Model",
-       "Subtitle": "Version of June 10, 2011",
+       "Subtitle": "Version of March 6, 2012"
        "Path": "/ref/mem"
 }-->
 
@@ -107,9 +107,9 @@ unspecified order.
 <h3>Initialization</h3>
 
 <p>
-Program initialization runs in a single goroutine and
-new goroutines created during initialization do not
-start running until initialization ends.
+Program initialization runs in a single goroutine,
+but that goroutine may create other goroutines,
+which run concurrently.
 </p>
 
 <p class="rule">
@@ -122,11 +122,6 @@ The start of the function <code>main.main</code> happens after
 all <code>init</code> functions have finished.
 </p>
 
-<p class="rule">
-The execution of any goroutines created during <code>init</code>
-functions happens after all <code>init</code> functions have finished.
-</p>
-
 <h3>Goroutine creation</h3>
 
 <p class="rule">