bcast.go
func (g *Group) Add(memberChannel chan interface{}) *Member {
	g.memberLock.Lock()
	g.clockLock.Lock()
	member := &Member{
		group:        g,
		Read:         memberChannel,
		clock:        g.clock,
		messageQueue: PriorityQueue{},
		send:         make(chan Message),
		close:        make(chan bool),
	}
	go member.listen()
	g.members = append(g.members, member)
	g.clockLock.Unlock()
	g.memberLock.Unlock()
	return member
}
func (g *Group) Add(memberChannel chan interface{}) *Member {
	g.memberLock.Lock()
	g.clockLock.Lock()
	member := &Member{
		group:        g,
		Read:         memberChannel,
		clock:        g.clock,
		messageQueue: PriorityQueue{},
		send:         make(chan Message),
		close:        make(chan bool),
	}
	go member.listen()
	g.members = append(g.members, member)
	g.clockLock.Unlock()
	g.memberLock.Unlock()
	return member
}
func ( g * Group ) Add ( memberChannel chan interface { } ) * Member { g . memberLock . Lock ( ) g . clockLock . Lock ( ) member := & Member { group : g , Read : memberChannel , clock : g . clock , messageQueue : PriorityQueue { } , send : make ( chan Message ) , close : make ( chan bool ) , } go member . listen ( ) g . members = append ( g . members , member ) g . clockLock . Unlock ( ) g . memberLock . Unlock ( ) return member }
// Add adds a member to the group for the provided interface channel.
Add adds a member to the group for the provided interface channel .