mperham/connection_pool — pull request #31 by simao (2013-05-25 17:21:30+00:00)
Title: First try to deal with #27

There are still a few problems:

1. `shutdown` is not thread safe. If this method gets called while the
thread holds a connection checked in, it will throw a timeout error.

Also, if `shutdown` is called more than once in different threads, a
deadlock can occur and a timeout error will be raised.

2. After `shutdown` is called, `@available` will be empty, which means
all `checkin` calls will raise a time out error.

This can be "solved" if we had some kind of check before checking
connections in to assert that the connection was not previously
shutdown, though maybe this should be solved by just not calling
`shutdown` more than once.