How do I make it so that I am stuck awaiting something if the value of it isn't true? for example :
await stuff() # Gets executed
await continueif(x, True) # This only returns when x is True
await morestuff() # Will get to this part when the above statement is executed, which only happens if the condition is true
...
without using while loop
So, ideally
x = True
continueif(x, True)
Should immediately let us pass through but,
x = False
continueif(x, True)
Should never let us pass through until or unless the value of x becomes True sometime during the execution of the program.