do no try libevent as a first default hub because poll and selects are more stable

This commit is contained in:
Denis Bilenko
2009-01-22 19:05:22 +06:00
parent 38721792e8
commit b97bbed861

View File

@@ -438,19 +438,13 @@ def exc_after(seconds, *throw_args):
def get_default_hub():
"""Select the default hub implementation based on what multiplexing
libraries are installed. Tries twistedr if a twisted reactor is imported,
then libevent, then poll, then select.
then poll, then select.
"""
if 'twisted.internet.reactor' in sys.modules:
from eventlet.hubs import twistedr
return twistedr
try:
import eventlet.hubs.libevent
return eventlet.hubs.libevent
except ImportError:
pass
import select
if hasattr(select, 'poll'):
import eventlet.hubs.poll