'Add a timeout for a send or recv Future'

def _add_timeout(self, future, timeout):

    def future_timeout():
        if future.done():
            return
        future.set_exception(_zmq.Again())
    self._call_later(timeout, future_timeout)
