cqlengine/cqlengine — pull request #155 by bergundy (2014-01-27 17:05:22+00:00)
Title: fix (rare) race condition in ConnectionPool.get()

Before this fix, in the scenario of 2 threads (t1, t2) issuing ConnectionPool.get() and 1 connection is in the queue, the following could have happened:

t1> self._queue.empty()
False
t2> self._queue.empty()
False
t1> return self._queue.get()
gets a connection
t2> return self._queue.get()
**raise queue.Empty**