Cooperative yield in asyncio
问题 I'm running a long CPU-intensive task on a (tornado) webserver. I don't want to offload this task to a thread (for now). How do I correctly "yield" control during this long-running task to the eventloop, so that web requests are still being served (note: I'm using "yield" in a cooperative-scheduling sense here, not in a generator-sense, or the python keyword yield ). My suggestion would be to do an await asyncio.sleep(0) , however is there a guarantee that this is not just implemented as a