Closed ChillFish8 closed 3 years ago
Man, reading your diffs is really hard, 90% of it is just unnecessary formatting changes, I'm guessing by some tool. It's a pain to try and understand what's actually changed. Please don't do this.
Haven't tested but seems reasonable. What's with all the await asyncio.sleep(0)
's everywhere?
Its Pycharm's BS default config i keep forgetting to change
asyncio.sleep(0) forces the coroutine to hand control back to the event loop without adding a delay, it should help the delay issues a bit with it not blocking.
This is due after benching the loops and the for loops has enough of a impact to start blocking the loop.
Example of what asyncio.sleep(0) does:
# This would normally block everything
while True:
pass
# This would will not block
while True:
await asyncio.sleep(0)
moving from standard handling to asyncio's run_in_executor because it's just easier