Example #1
0
    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
Example #2
0
    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