Maybe have a helper method to install the best reactor for the system:
#--------------------------------------------------------------------------
-#
# Helper Methods
#--------------------------------------------------------------------------
-#
def install_specialized_reactor():
'''
This attempts to install a reactor specialized for the given
operating system.
:returns: True if a specialized reactor was installed, False otherwise
'''
from twisted.internet import epollreactor, kqreactor, iocpreactor
for reactor in [epollreactor, kqreactor, iocpreactor]:
try:
reactor.install()
_logger.debug("Installed %s" % reactor.__name__)
return True
except: pass
_logger.debug("No specialized reactor was installed")
return False
Original issue reported on code.google.com by Bashw...@gmail.com on 4 Jun 2010 at 7:38
Original issue reported on code.google.com by
Bashw...@gmail.com
on 4 Jun 2010 at 7:38