gmr/rabbitpy — pull request #26 by kristaps (2014-04-08 23:47:56+00:00)
Title: Don't spin while waiting for the socket to connect.

Spinning prevents rabbitpy from working with code that uses gevent and its monkey patch. For example "Connected" wouldn't get printed in the following example as the IO thread will be starved by the main thread spinning in Connection._connect():

```python
from gevent import monkey; monkey.patch_all()
import rabbitpy

connection = rabbitpy.Connection('amqp://guest:guest@localhost/%2F?locale=en_US.UTF-8')
print "Connected"
connection.close()
```

Waiting on an event gives other greenlets a chance to run and the IO thread can complete the connection.