do no try libevent as a first default hub because poll and selects are more stable
This commit is contained in:
@@ -438,19 +438,13 @@ def exc_after(seconds, *throw_args):
|
|||||||
def get_default_hub():
|
def get_default_hub():
|
||||||
"""Select the default hub implementation based on what multiplexing
|
"""Select the default hub implementation based on what multiplexing
|
||||||
libraries are installed. Tries twistedr if a twisted reactor is imported,
|
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:
|
if 'twisted.internet.reactor' in sys.modules:
|
||||||
from eventlet.hubs import twistedr
|
from eventlet.hubs import twistedr
|
||||||
return twistedr
|
return twistedr
|
||||||
|
|
||||||
try:
|
|
||||||
import eventlet.hubs.libevent
|
|
||||||
return eventlet.hubs.libevent
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
import select
|
import select
|
||||||
if hasattr(select, 'poll'):
|
if hasattr(select, 'poll'):
|
||||||
import eventlet.hubs.poll
|
import eventlet.hubs.poll
|
||||||
|
Reference in New Issue
Block a user