]> piware.de Git - learn-rust.git/commitdiff
async-http: Serve requests concurrently
authorMartin Pitt <martin@piware.de>
Fri, 16 Sep 2022 06:47:48 +0000 (08:47 +0200)
committerMartin Pitt <martin@piware.de>
Fri, 16 Sep 2022 06:58:56 +0000 (08:58 +0200)
Move to asyncstd TCPListener and futures Stream, so that the incoming
loop does not serialize/block requests any more.

This is still single-threaded. That can be demonstrated with replacing
the async sleep with a sync one (commented out). Then /sleep will block
other requests again.


No differences found