From ea107e968729a170ee5b4ed4620492e6d31012b2 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Mon, 11 Dec 2023 17:30:37 +0000 Subject: [PATCH] no tokio spawn required --- repro-problem/src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/repro-problem/src/main.rs b/repro-problem/src/main.rs index d68c34c39c..499e4029b2 100644 --- a/repro-problem/src/main.rs +++ b/repro-problem/src/main.rs @@ -4,11 +4,10 @@ use virtual_file::VirtualFile; mod page_cache; mod virtual_file; -#[tokio::main] -async fn main() { +fn main() { page_cache::init(10); - tokio::spawn(async move { + let x: Box + Send> = Box::new(async move { let cache = page_cache::get(); let res = cache