def METHOD_NAME(self):
    logger.debug('yielding chunks')
    while True:
        logger.debug('waiting for chunk')
        item = self.queue.get()
        if item is None:
            logger.debug('stop yielding, file closed')
            break
        # if isinstance(item, BaseException):
        #     logger.debug('stop yielding, exception occured')
        #     raise item
        yield item
    if self.exception:
        raise self.exception