1
0
Fork 0
forked from External/ergo

refactor synchronization for Channel

This commit is contained in:
Shivaram Lingamneni 2017-10-22 19:50:16 -04:00
parent c026cc5ab6
commit fa83ccd82b
9 changed files with 434 additions and 342 deletions

View file

@ -139,13 +139,3 @@ func (members MemberSet) AnyHasMode(mode Mode) bool {
// ChannelSet is a set of channels.
type ChannelSet map[*Channel]bool
// Add adds the given channel to this set.
func (channels ChannelSet) Add(channel *Channel) {
channels[channel] = true
}
// Remove removes the given channel from this set.
func (channels ChannelSet) Remove(channel *Channel) {
delete(channels, channel)
}