*: fix goroutines typos

release-3.5
fengpf 2020-03-24 15:33:47 +08:00
parent 0eee733220
commit 1f70c0b075
4 changed files with 5 additions and 5 deletions

View File

@ -763,7 +763,7 @@ func (s *store) Clone() Store {
// Recovery recovers the store system from a static state // Recovery recovers the store system from a static state
// It needs to recover the parent field of the nodes. // It needs to recover the parent field of the nodes.
// It needs to delete the expired nodes since the saved time and also // It needs to delete the expired nodes since the saved time and also
// needs to create monitoring go routines. // needs to create monitoring goroutines.
func (s *store) Recovery(state []byte) error { func (s *store) Recovery(state []byte) error {
s.worldLock.Lock() s.worldLock.Lock()
defer s.worldLock.Unlock() defer s.worldLock.Unlock()

View File

@ -265,7 +265,7 @@ type EtcdServer struct {
// wgMu blocks concurrent waitgroup mutation while server stopping // wgMu blocks concurrent waitgroup mutation while server stopping
wgMu sync.RWMutex wgMu sync.RWMutex
// wg is used to wait for the go routines that depends on the server state // wg is used to wait for the goroutines that depends on the server state
// to exit when stopping the server. // to exit when stopping the server.
wg sync.WaitGroup wg sync.WaitGroup

View File

@ -62,7 +62,7 @@ type leaseStresser struct {
type atomicLeases struct { type atomicLeases struct {
// rwLock is used to protect read/write access of leases map // rwLock is used to protect read/write access of leases map
// which are accessed and modified by different go routines. // which are accessed and modified by different goroutines.
rwLock sync.RWMutex rwLock sync.RWMutex
leases map[int64]time.Time leases map[int64]time.Time
} }
@ -217,7 +217,7 @@ func (ls *leaseStresser) createAliveLeases() {
return return
} }
ls.aliveLeases.add(leaseID, time.Now()) ls.aliveLeases.add(leaseID, time.Now())
// keep track of all the keep lease alive go routines // keep track of all the keep lease alive goroutines
ls.aliveWg.Add(1) ls.aliveWg.Add(1)
go ls.keepLeaseAlive(leaseID) go ls.keepLeaseAlive(leaseID)
}() }()

View File

@ -779,7 +779,7 @@ func TestConcurrentReadTxAndWrite(t *testing.T) {
}() }()
} }
// wait until go routines finish or timeout // wait until goroutines finish or timeout
doneC := make(chan struct{}) doneC := make(chan struct{})
go func() { go func() {
wg.Wait() wg.Wait()