Merge pull request #9679 from lorneli/lorneli-raft-dev

raft: describe the purpose of lockedRand
release-3.4
Xiang Li 2018-05-26 22:03:18 -07:00 committed by GitHub
commit 357308bfcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -72,8 +72,8 @@ const (
var ErrProposalDropped = errors.New("raft proposal dropped")
// lockedRand is a small wrapper around rand.Rand to provide
// synchronization. Only the methods needed by the code are exposed
// (e.g. Intn).
// synchronization among multiple raft groups. Only the methods needed
// by the code are exposed (e.g. Intn).
type lockedRand struct {
mu sync.Mutex
rand *rand.Rand