Skip to content

Commit

Permalink
Merge pull request redis#289 from go-redis/fix/unneeded-sync
Browse files Browse the repository at this point in the history
Remove unneeded synchronization.
  • Loading branch information
vmihailenco committed Mar 19, 2016
2 parents d2ae7d8 + d802f0e commit ffbcf67
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"log"
"os"
"sync/atomic"

"gopkg.in/redis.v3/internal/pool"
)
Expand Down Expand Up @@ -170,12 +169,12 @@ func NewClient(opt *Options) *Client {
func (c *Client) PoolStats() *PoolStats {
s := c.connPool.Stats()
return &PoolStats{
Requests: atomic.LoadUint32(&s.Requests),
Hits: atomic.LoadUint32(&s.Hits),
Waits: atomic.LoadUint32(&s.Waits),
Timeouts: atomic.LoadUint32(&s.Timeouts),
Requests: s.Requests,
Hits: s.Hits,
Waits: s.Waits,
Timeouts: s.Timeouts,

TotalConns: atomic.LoadUint32(&s.TotalConns),
FreeConns: atomic.LoadUint32(&s.FreeConns),
TotalConns: s.TotalConns,
FreeConns: s.FreeConns,
}
}

0 comments on commit ffbcf67

Please sign in to comment.