Skip to content

Instantly share code, notes, and snippets.

@jordic
Created April 13, 2019 06:59
Show Gist options
  • Save jordic/0f194c4d39eae28570fe3fe75e5326e1 to your computer and use it in GitHub Desktop.
Save jordic/0f194c4d39eae28570fe3fe75e5326e1 to your computer and use it in GitHub Desktop.
snippets
_, pending = await asyncio.wait(
[handler_task, receiver_task], return_when=asyncio.FIRST_COMPLETED,
)
await _cancel_tasks(pending)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment