hold a lock until all goroutines finishes

后端 未结 0 1739
轻奢々
轻奢々 2021-01-30 02:32

Below is a piece of code written in Go taken from Raft Locking Advice, rule 5:

  rf.mu.Lock()
  rf.currentTerm += 1
  rf.state = Candidate
  for          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题