]> Cypherpunks repositories - gostls13.git/commitdiff
sync: remove old WaitGroup example
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 1 Mar 2012 17:26:08 +0000 (21:26 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 1 Mar 2012 17:26:08 +0000 (21:26 +0400)
The docs look awkward - there is a paragraph
"For example:" with a plain text example,
and straight below it a real Example.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5717048

src/pkg/sync/waitgroup.go

index 3e7d9d3c8f4099cdadb0a1e7b1b202c2cd509a69..0165b1ffb2b4563f7abd6a00c4b3838d5d646bad 100644 (file)
@@ -11,21 +11,6 @@ import "sync/atomic"
 // goroutines to wait for.  Then each of the goroutines
 // runs and calls Done when finished.  At the same time,
 // Wait can be used to block until all goroutines have finished.
-//
-// For example:
-//
-//   for i := 0; i < n; i++ {
-//       if !condition(i) {
-//           continue
-//       }
-//       wg.Add(1)
-//       go func() {
-//           // Do something.
-//           wg.Done()
-//       }()
-//   }
-//   wg.Wait()
-// 
 type WaitGroup struct {
        m       Mutex
        counter int32