Merge pull request #9679 from lorneli/lorneli-raft-dev
raft: describe the purpose of lockedRandrelease-3.4
commit
357308bfcd
|
@ -72,8 +72,8 @@ const (
|
||||||
var ErrProposalDropped = errors.New("raft proposal dropped")
|
var ErrProposalDropped = errors.New("raft proposal dropped")
|
||||||
|
|
||||||
// lockedRand is a small wrapper around rand.Rand to provide
|
// lockedRand is a small wrapper around rand.Rand to provide
|
||||||
// synchronization. Only the methods needed by the code are exposed
|
// synchronization among multiple raft groups. Only the methods needed
|
||||||
// (e.g. Intn).
|
// by the code are exposed (e.g. Intn).
|
||||||
type lockedRand struct {
|
type lockedRand struct {
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
rand *rand.Rand
|
rand *rand.Rand
|
||||||
|
|
Loading…
Reference in New Issue