I'm using the driver in a uwsgi+flask+cassandra app. uwsgi runs with the option '--gevent-monkey-patch', which will
1. initialize the wsgi app
2. start event loop
3. apply gevent monkey patch
This means the driver is imported before gevent monkey patch. So the following code in cluster.py won't choose GeventConnection as default connection class(instead it defaults to AsyncoreConnection on my environment.)
It causes a very high cpu load in my uwsgi process, seems gevent and AsyncoreConnection doesn't work for each other.
Someone has submitted a similar issue to uwsgi https://github.com/unbit/uwsgi/issues/701. In uwsgi 2.1, --gevent-early-monkey-patch option is added to solve the issue.
However I'm thinking about the above code. If we can decide which connection class to use in a later time instead of when imported, the problem would be solved. I'm not sure if it's feasible to make the change. Any thoughts?