doc: mention gevent/eventlet patching assumptions
This commit is contained in:
@@ -407,18 +407,17 @@ class Cluster(object):
|
|||||||
|
|
||||||
* :class:`cassandra.io.asyncorereactor.AsyncoreConnection`
|
* :class:`cassandra.io.asyncorereactor.AsyncoreConnection`
|
||||||
* :class:`cassandra.io.libevreactor.LibevConnection`
|
* :class:`cassandra.io.libevreactor.LibevConnection`
|
||||||
* :class:`cassandra.io.geventreactor.GeventConnection` (requires monkey-patching)
|
* :class:`cassandra.io.eventletreactor.EventletConnection` (requires monkey-patching - see doc for details)
|
||||||
|
* :class:`cassandra.io.geventreactor.GeventConnection` (requires monkey-patching - see doc for details)
|
||||||
* :class:`cassandra.io.twistedreactor.TwistedConnection`
|
* :class:`cassandra.io.twistedreactor.TwistedConnection`
|
||||||
|
|
||||||
By default, ``AsyncoreConnection`` will be used, which uses
|
By default, ``AsyncoreConnection`` will be used, which uses
|
||||||
the ``asyncore`` module in the Python standard library. The
|
the ``asyncore`` module in the Python standard library.
|
||||||
performance is slightly worse than with ``libev``, but it is
|
|
||||||
supported on a wider range of systems.
|
|
||||||
|
|
||||||
If ``libev`` is installed, ``LibevConnection`` will be used instead.
|
If ``libev`` is installed, ``LibevConnection`` will be used instead.
|
||||||
|
|
||||||
If gevent monkey-patching of the standard library is detected,
|
If ``gevent`` or ``eventlet`` monkey-patching is detected, the corresponding
|
||||||
GeventConnection will be used automatically.
|
connection class will be used automatically.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
control_connection_timeout = 2.0
|
control_connection_timeout = 2.0
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ def is_timeout(err):
|
|||||||
class EventletConnection(Connection):
|
class EventletConnection(Connection):
|
||||||
"""
|
"""
|
||||||
An implementation of :class:`.Connection` that utilizes ``eventlet``.
|
An implementation of :class:`.Connection` that utilizes ``eventlet``.
|
||||||
|
|
||||||
|
This implementation assumes all eventlet monkey patching is active. It is not tested with partial patching.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_read_watcher = None
|
_read_watcher = None
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ from gevent.queue import Queue
|
|||||||
from gevent import select, socket
|
from gevent import select, socket
|
||||||
import gevent.ssl
|
import gevent.ssl
|
||||||
|
|
||||||
from collections import defaultdict
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@@ -44,6 +43,8 @@ def is_timeout(err):
|
|||||||
class GeventConnection(Connection):
|
class GeventConnection(Connection):
|
||||||
"""
|
"""
|
||||||
An implementation of :class:`.Connection` that utilizes ``gevent``.
|
An implementation of :class:`.Connection` that utilizes ``gevent``.
|
||||||
|
|
||||||
|
This implementation assumes all gevent monkey patching is active. It is not tested with partial patching.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_read_watcher = None
|
_read_watcher = None
|
||||||
|
|||||||
Reference in New Issue
Block a user