Closed elimist closed 7 years ago
It wasn't needed before the hub.len()
method which can read sessions
asynchronously. It is probably possible to rewrite it without using locks though.
I answered this before:
Sorry, I missed that issue. That clears it up, thanks!
Hey, thanks for making this library, it's great!
I was wondering: is the mutex here really necessary? It seems the sessions map will never be written to by more than one goroutine and there would probably be some perf gains by removing the lock.