mirror of https://github.com/go-redis/redis.git
4f70db6849
This makes the reading and writing of lastDialError from the pool faster, as atomic.Value is much more lightweight than the mutex. Note that using error in atomic.Value directly could cause panics, because errors could have inconsistent types. Thus wrap them with a simple struct. |
||
---|---|---|
.. | ||
bench_test.go | ||
conn.go | ||
export_test.go | ||
main_test.go | ||
pool.go | ||
pool_single.go | ||
pool_sticky.go | ||
pool_test.go |