3 from eventlet import patcher
4 from eventlet.green import select
11 # We only have green select so the options are:
12 # * leave it be and have selectors that block
13 # * try to pretend the "bad" selectors don't exist
14 # * replace all with SelectSelector for the price of possibly different
15 # performance characteristic and missing fileno() method (if someone
16 # uses it it'll result in a crash, we may want to implement it in the future)
18 # This module used to follow the third approach but just removing the offending
19 # selectors is less error prone and less confusing approach.
27 patcher.inject('selectors', globals(), ('select', select))
31 if sys.platform != 'win32':
32 SelectSelector._select = staticmethod(select.select)
34 DefaultSelector = SelectSelector