Make fd methods optional.

This commit is contained in:
Guido van Rossum 2012-12-13 07:54:08 -08:00
parent 53018c7e85
commit bd2ff471a3
1 changed files with 5 additions and 0 deletions

View File

@ -175,6 +175,11 @@ A conforming event loop object has the following methods:
later time in a threadsafe manner, you can use
``ev.call_soon_threadsafe(ev.call_later, when, callback, *args)``.)
The following methods for registering callbacks for file descriptors
are optional. The default implementation provides them but the user
normally doesn't use these directly -- they are used by the transport
implementations exclusively:
- ``add_reader(fd, callback, *args)``. Arrange for
``callback(*args)`` to be called whenever file descriptor ``fd`` is
ready for reading. Returns a ``DelayedCall`` object which can be