Practice ยท 1 of 1
Timeout-bounded job runner
Implement async def with_timeout(job, seconds):
- run the zero-arg async callable job under asyncio.timeout(seconds)
- return the job's value when it finishes in time
- return exactly the string f'timeout:{seconds}' when it exceeds the budget
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Timeout Practice