def future_done(self, future, rv):
        if rv != 0:
            logging.error("error: async operation: %s on sink: %s" %
                          (rv, self))
        if future:
            future.done_rv = rv
            future.done.set()


# --------------------------------------------------
Worker calls this method to finish a batch/future.
dataset/ETHPy150Open membase/membase-cli/pump.py/Sink.future_done