Created
January 20, 2024 10:59
-
-
Save koi8-r/cba8bf688fc6fb1368959efac28272d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task = asyncio.create_task(read_output()) | |
handler = event_loop().call_later(2, cancel_asyncio_task, task) | |
task.add_done_callback(lambda _: handler.cancel()) | |
await task |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment