olahol/melody

No need Mutex if you use Channel. Am I right?

Closed this issue · 4 comments

Access tot hub.session already synchronous, because channels not buffered.

https://blog.golang.org/share-memory-by-communicating

It's locked because hub.sessions can be accessed asynchronously by hub.len().

https://github.com/olahol/melody/blob/master/hub.go#L71-L76

What's the problem with https://github.com/olahol/melody/blob/master/examples/gophers/main.go ?

Understand, thank you