mediocregopher / radix.v2

Redis client for Go
http://godoc.org/github.com/mediocregopher/radix.v2
MIT License
433 stars 92 forks source link

Added pool.GetTimeout to limit how long Get blocks when pool is empty #88

Closed jameshartig closed 6 years ago

jameshartig commented 6 years ago

This currently only affects Get if CreateLimit is used, but this could be used in the future for any other blocking features that are added. A specific ErrGetTimeout is returned if it is hit so the caller could potentially do something special.

jameshartig commented 6 years ago

@mediocregopher updated fixing those 3 things. Not sure why I thought nil channels returned the zeroed value immediately versus blocking.