pycassa/pycassa — pull request #209 by edevil (2013-07-26 14:26:55+00:00)
Title: Use a lock around all updates to shared state.

Prevent closed connections from ending up in the pool (Mutator uses "return_to_pool"). Since current_conns has already been decremented, the pool would reach a state where a new connection was always opened but could not be put in the queue since it was full.