server = await asyncio.start_server( context.handle_requests, str(config.host), config.port, limit=MAX_READ_SIZE )
I stumbled on this as something that works:
useless_lock = asyncio.Lock() while True: await useless_lock.acquire()
async with server: await server.serve_forever()
I reiterate that serve_forever() is not in 3.6.
I stumbled on this as something that works:
Which demonstrates that the following is, ahem, sleight of hand: although supposedly it guarantees some cleanup which I don't care about. Both options respond identically (at least with 3.11.0) to ^C.I reiterate that serve_forever() is not in 3.6.