Closed yiippee closed 2 years ago
In your code: func newHub() hub { return &hub{ sessions: make(map[Session]bool), broadcast: make(chan envelope), register: make(chan Session), unregister: make(chan Session), exit: make(chan envelope), open: true, rwmutex: &sync.RWMutex{}, } }
But I thank " broadcast: make(chan *envelope, 1024) " is better, or I misunderstand something. Thanks for your project.
In your code: func newHub() hub { return &hub{ sessions: make(map[Session]bool), broadcast: make(chan envelope), register: make(chan Session), unregister: make(chan Session), exit: make(chan envelope), open: true, rwmutex: &sync.RWMutex{}, } }
But I thank " broadcast: make(chan *envelope, 1024) " is better, or I misunderstand something. Thanks for your project.