From a85b4ff5a364f00c34bc59a5525deb2b69b52bff Mon Sep 17 00:00:00 2001 From: Kotaro Abe Date: Sun, 19 Jun 2022 22:49:21 +0900 Subject: [PATCH] Replace `tokio::time::delay_for` with `tokio::time::sleep` (#273) --- content/docs/server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/server.md b/content/docs/server.md index b8c03a0..e5bc1c2 100644 --- a/content/docs/server.md +++ b/content/docs/server.md @@ -43,7 +43,7 @@ For this reason, any long, non-cpu-bound operation (e.g. I/O, database operation ```rust async fn my_handler() -> impl Responder { - tokio::time::delay_for(Duration::from_secs(5)).await; // <-- Ok. Worker thread will handle other requests here + tokio::time::sleep(Duration::from_secs(5)).await; // <-- Ok. Worker thread will handle other requests here "response" } ```