go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

client: document threadsafety

Open libla opened this issue 2 years ago • 1 comments

Go documentation usually follows a rule of: something is only safe for concurrent access if it's explicitly documented to be safe.

I don't see any explicit documentation regarding thread safety on https://redis.uptrace.dev/guide/go-redis.html, so I would assume it is not safe to us a redis client from multiple goroutines.

However, the code does appear to be threadsafe, so perhaps just the docs need updating?

libla avatar May 26 '22 01:05 libla

We have this information in the reference - https://pkg.go.dev/github.com/go-redis/redis/v8. Search for "It's safe for concurrent". That is the main source of the truth, but we can add something to the docs as well. Do you mind sending a PR?

vmihailenco avatar May 26 '22 07:05 vmihailenco

This issue is marked stale. It will be closed in 30 days if it is not updated.

github-actions[bot] avatar Sep 22 '23 00:09 github-actions[bot]