Exemplo n.º 1
0
        async def inner():
            try:
                value = await func(*args, **kwargs)
            except:
                exc = to_exception(*sys.exc_info())
            else:
                exc = StopAsyncIteration(value)

            self.__finished = True
            await self.__queue_yield.put((None, exc))
Exemplo n.º 2
0
    async def throw(self, exc_type, exc_value=None, exc_tb=None):
        exc = to_exception(exc_type, exc_value, exc_tb)

        return await self.__send(None, exc)