async def __aiter__(self): while not self.is_done(): x = await self.get() if self.pipeline_namespace.error: return if not pypeln_utils.is_continue(x): yield x
def __iter__(self): while not self.is_done(): if self.pipeline_namespace.error: return if self.empty(): time.sleep(pypeln_utils.TIMEOUT) else: x = self.get_nowait() if not pypeln_utils.is_continue(x): yield x