ó
¨œž[c           @` sN   d  Z  d d l m Z m Z m Z d „  Z d e f d „  ƒ  YZ d „  Z d S(   s÷   Interfaces for platform-specific functionality.

This module exists primarily for documentation purposes and as base classes
for other tornado.platform modules.  Most code should import the appropriate
implementation from `tornado.platform.auto`.
i    (   t   absolute_importt   divisiont   print_functionc         C` s   t  ƒ  ‚ d S(   sA   Sets the close-on-exec bit (``FD_CLOEXEC``)for a file descriptor.N(   t   NotImplementedError(   t   fd(    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyt   set_close_exec   s    t   Wakerc           B` s;   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sŸ  A socket-like object that can wake another thread from ``select()``.

    The `~tornado.ioloop.IOLoop` will add the Waker's `fileno()` to
    its ``select`` (or ``epoll`` or ``kqueue``) calls.  When another
    thread wants to wake up the loop, it calls `wake`.  Once it has woken
    up, it will call `consume` to do any necessary per-wake cleanup.  When
    the ``IOLoop`` is closed, it closes its waker too.
    c         C` s   t  ƒ  ‚ d S(   sš   Returns the read file descriptor for this waker.

        Must be suitable for use with ``select()`` or equivalent on the
        local platform.
        N(   R   (   t   self(    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyt   fileno(   s    c         C` s   t  ƒ  ‚ d S(   s1   Returns the write file descriptor for this waker.N(   R   (   R   (    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyt   write_fileno0   s    c         C` s   t  ƒ  ‚ d S(   s1   Triggers activity on the waker's file descriptor.N(   R   (   R   (    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyt   wake4   s    c         C` s   t  ƒ  ‚ d S(   sA   Called after the listen has woken up to do any necessary cleanup.N(   R   (   R   (    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyt   consume8   s    c         C` s   t  ƒ  ‚ d S(   s&   Closes the waker's file descriptor(s).N(   R   (   R   (    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyt   close<   s    (   t   __name__t
   __module__t   __doc__R   R	   R
   R   R   (    (    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyR      s   				c           C` s   t  ƒ  ‚ d  S(   N(   R   (    (    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyt   monotonic_timeA   s    N(	   R   t
   __future__R    R   R   R   t   objectR   R   (    (    (    s9   lib/python2.7/site-packages/tornado/platform/interface.pyt   <module>   s   	"