ptaoussanis/carmine — pull request #55 by cespare (2013-09-26 17:21:43+00:00)
Title: Fix race when getting the connection pool

Right now, multiple threads can create identical connection pools. What's supposed to happen is that the first thread would create and cache the pool and subsequent threads would pick it up; however, the cache check is racy.

We found this empirically when making redis connections from lots of threads around the same time.

There's probably a more clojure-y way of fixing this issue that you would want to use, but just locking around `conn-pool`'s internal logic was the quick fix we used.