##// END OF EJS Templates
selectors2: do not use platform.system()...
Jun Wu -
r34640:a568a467 default
parent child Browse files
Show More
@@ -314,3 +314,5 b' else:'
314 314 stringio = cStringIO.StringIO
315 315 maplist = map
316 316 rawinput = raw_input
317
318 isjython = sysplatform.startswith('java')
@@ -29,12 +29,13 b' from __future__ import absolute_import'
29 29 import collections
30 30 import errno
31 31 import math
32 import platform
33 32 import select
34 33 import socket
35 34 import sys
36 35 import time
37 36
37 from . import pycompat
38
38 39 namedtuple = collections.namedtuple
39 40 Mapping = collections.Mapping
40 41
@@ -288,7 +289,7 b' if hasattr(select, "select"):'
288 289 __all__.append('SelectSelector')
289 290
290 291 # Jython has a different implementation of .fileno() for socket objects.
291 if platform.system() == 'Java':
292 if pycompat.isjython:
292 293 class _JythonSelectorMapping(object):
293 294 """ This is an implementation of _SelectorMapping that is built
294 295 for use specifically with Jython, which does not provide a hashable
@@ -727,7 +728,7 b' def DefaultSelector():'
727 728 by eventlet, greenlet, and preserve proper behavior. """
728 729 global _DEFAULT_SELECTOR
729 730 if _DEFAULT_SELECTOR is None:
730 if platform.system() == 'Java': # Platform-specific: Jython
731 if pycompat.isjython:
731 732 _DEFAULT_SELECTOR = JythonSelectSelector
732 733 elif _can_allocate('kqueue'):
733 734 _DEFAULT_SELECTOR = KqueueSelector
General Comments 0
You need to be logged in to leave comments. Login now