Curio http server, how?


There are some talks about a curio http server In topic, and yet i can not figure out how curio works in a http server, is there any one can share something?

Here is the thing i can not figure out:

As curio is single thread, so if a request handler do not yield, curio can not handle many requests but just one request one time.

And a request handler only yield when it hit a database, or a cache, so we have to write some asynchronous database/cache packages to support yield from in a request handler?

Or just put all IO operations into other threads?

Hope i make it clearly.


you can look at the h2 project :


thinks for apply!

spawn a task for every request and every IO operation, yes, i know that.

what exactly i am struggle with is should we include a async orm(or any other async database operation tool)in a async http server, like django include a orm?

maybe no, i guess.