Closed yesuu closed 11 years ago
If you use multiple redis.Connect calls you'll be creating new connections to the server but if your goroutines share a common *redis.Client you can expect only one connection stablished.
If you have problems with goroutines that should be filled as a bug, I've made modifications to both gosexy/redis and hiredis.c in order to not have problems with goroutines (hiredis.c was initially refusing to work with concurrent processes).
Just be aware that there are some blocking commands that would indeed block your client connections :), these commands are SUBSCRIBE
and PSUBSCRIBE
. You should not have problems with any other commands, if you do, please file a bug and attach a code example.
Does each user request is the establishment of a *redis.Client object?