]> Cypherpunks repositories - gostls13.git/commit
sync: improve WaitGroup example by putting the call to Done in a
authorGaal Yahas <gaal@google.com>
Wed, 6 Feb 2013 16:39:52 +0000 (00:39 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Wed, 6 Feb 2013 16:39:52 +0000 (00:39 +0800)
commitc2fb6e2c0bf7ba6866eb27567b5d16683680e63b
tree92da88155b2ab89e311c13ccf7e4fb58a5e343f0
parentc3f49ca9779c80cf2769745ec35939389a4982ee
sync: improve WaitGroup example by putting the call to Done in a
deferred block. This makes hangs in the waiting code less likely
if a goroutine exits abnormally.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7306052
src/pkg/sync/example_test.go