Skip to content

Instantly share code, notes, and snippets.

View vhxs's full-sized avatar
💻
coding or mathing

Vikram Saraph vhxs

💻
coding or mathing
View GitHub Profile
@vhxs
vhxs / bad_asyncio_example.py
Last active January 17, 2022 18:28
How not to use asyncio
import asyncio
import socket
async def alice():
print("started alice")
# alice's task starts: she attempts to connect to Bob's server
while True:
try:
# this is where we try to connect to bob's server
# if the server hasn't started, we try again