mperham/connection_pool — pull request #53 by drbrain (2014-02-22 00:18:13+00:00)
Title: Support different types of connection in a pool

This allows connection_pool to manage heterogenous connections in a pool. Connections may be of different classes. Connections are distinguished by hash equality on a description object that is used as parameters for creation of a connection. Old connections waiting in the pool are reclaimed if connections of a different type are needed.

The LRU for connection reclamation is ruby 1.9+ only. I can't tell if connection_pool is supposed to support ruby 1.8 or not. While the specification doesn't indicate, the tests use require_relative which is 1.9+.

I have not updated the documentation as I wish to await approval of my API changes.

If connection_pool supports only 1.9+ it can use keyword arguments to retrieve the timeout option (instead of the options hash). This would remove the clumsy argument swapping.