libaio/__init__.py
def cancelAll(self):
        """
        Cancel all submitted IO blocks.

        Blocks until all submitted transfers have been finalised.
        Submitting more transfers or processing completion events while this
        method is running produces undefined behaviour.
        Returns the list of values returned by individual cancellations.
        See "cancel" documentation.
        """
        cancel = self.cancel
        result = []
        for block, _ in self._submitted.itervalues():
            try:
                result.append(cancel(block))
            except OSError as exc:
                # EINVAL should mean we requested to cancel a not-in-flight
                # transfer - maybe it was just completed and we just did
                # not process its completion event yet.
                if exc.errno != errno.EINVAL:
                    raise
        return result
def cancelAll(self):
        """
        Cancel all submitted IO blocks.

        Blocks until all submitted transfers have been finalised.
        Submitting more transfers or processing completion events while this
        method is running produces undefined behaviour.
        Returns the list of values returned by individual cancellations.
        See "cancel" documentation.
        """
        cancel = self.cancel
        result = []
        for block, _ in self._submitted.itervalues():
            try:
                result.append(cancel(block))
            except OSError as exc:
                # EINVAL should mean we requested to cancel a not-in-flight
                # transfer - maybe it was just completed and we just did
                # not process its completion event yet.
                if exc.errno != errno.EINVAL:
                    raise
        return result
Cancel all submitted IO blocks.

        Blocks until all submitted transfers have been finalised.
        Submitting more transfers or processing completion events while this
        method is running produces undefined behaviour.
        Returns the list of values returned by individual cancellations.
        See "cancel" documentation.