'Add a FileDescriptor for notification of data available to write.'

def addWriter(self, writer):

    if (writer in self._writers):
        return
    fd = writer.fileno()
    self._writers[writer] = fd
    if (fd in self._fds):
        (reader, _) = self._fds[fd]
        self._fds[fd] = (reader, writer)
        if reader:
            self._io_loop.update_handler(fd, (IOLoop.READ | IOLoop.WRITE))
    else:
        with NullContext():
            self._fds[fd] = (None, writer)
            self._io_loop.add_handler(fd, self._invoke_callback, IOLoop.WRITE)
