Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 """Implementation of platform-specific functionality.
00018
00019 For each function or class described in `tornado.platform.interface`,
00020 the appropriate platform-specific implementation exists in this module.
00021 Most code that needs access to this functionality should do e.g.::
00022
00023 from tornado.platform.auto import set_close_exec
00024 """
00025
00026 from __future__ import absolute_import, division, print_function, with_statement
00027
00028 import os
00029
00030 if os.name == 'nt':
00031 from tornado.platform.common import Waker
00032 from tornado.platform.windows import set_close_exec
00033 elif 'APPENGINE_RUNTIME' in os.environ:
00034 from tornado.platform.common import Waker
00035 def set_close_exec(fd):
00036 pass
00037 else:
00038 from tornado.platform.posix import set_close_exec, Waker
00039
00040 try:
00041
00042
00043 import monotime
00044 except ImportError:
00045 pass
00046 try:
00047 from time import monotonic as monotonic_time
00048 except ImportError:
00049 monotonic_time = None