async def try_while_running(self, callable, timeout=0.5):
    'Return result of `callable`, or raise `ComponentInterrupted` if component is stopped.'
    while self.running:
        coro = callable()
        try:
            return (await asyncio.wait_for(coro, timeout))
        except asyncio.TimeoutError:
            pass
    raise ComponentInterrupted
Return result of `callable`, or raise `ComponentInterrupted` if component is stopped.
async def try_while_running(self, callable, timeout=0.5):
    
    while self.running:
        coro = callable()
        try:
            return (await asyncio.wait_for(coro, timeout))
        except asyncio.TimeoutError:
            pass
    raise ComponentInterrupted