future.go
func (v *verifyFuture) vote(leader bool) {
	v.voteLock.Lock()
	defer v.voteLock.Unlock()

	// Guard against having notified already
	if v.notifyCh == nil {
		return
	}

	if leader {
		v.votes++
		if v.votes >= v.quorumSize {
			v.notifyCh <- v
			v.notifyCh = nil
		}
	} else {
		v.notifyCh <- v
		v.notifyCh = nil
	}
}
func (v *verifyFuture) vote(leader bool) {
	v.voteLock.Lock()
	defer v.voteLock.Unlock()

	// Guard against having notified already
	if v.notifyCh == nil {
		return
	}

	if leader {
		v.votes++
		if v.votes >= v.quorumSize {
			v.notifyCh <- v
			v.notifyCh = nil
		}
	} else {
		v.notifyCh <- v
		v.notifyCh = nil
	}
}
func ( v * verifyFuture ) vote ( leader bool ) { v . voteLock . Lock ( ) defer v . voteLock . Unlock ( ) // Guard against having notified already if v . notifyCh == nil { return } if leader { v . votes ++ if v . votes >= v . quorumSize { v . notifyCh <- v v . notifyCh = nil } } else { v . notifyCh <- v v . notifyCh = nil } }
// vote is used to respond to a verifyFuture.
// This may block when responding on the notifyCh.
vote is used to respond to a verifyFuture . This may block when responding on the notifyCh .