SyntaxFix
Write A Post
Hire A Developer
Questions
For those using asyncio, an easy way is to use asyncio.wait_for():
asyncio.wait_for()
async def my_loop(): res = False while not res: res = await do_something() await asyncio.wait_for(my_loop(), 10)