(self, predicate)
return result
Wait until a predicate becomes true.

        The predicate should be a callable which result will be
        interpreted as a boolean value.  The final predicate value is
        the return value.
Wait until a predicate becomes true.
Wait until a predicate becomes true .
async def wait_for(self, predicate):
        """Wait until a predicate becomes true.

        The predicate should be a callable which result will be
        interpreted as a boolean value.  The final predicate value is
        the return value.
        """
        result = predicate()
        while not result:
            await self.wait()
            result = predicate()
        return result
async def wait_for ( self , predicate ) : result = predicate ( ) while not result : await self . wait ( ) result = predicate ( ) return result