If I run this very simple Rust program and attach with gdb or check with htop, I see that it creates 16 threads (exactly how many cores I have on the machine by the way) even though I am passing in the option to run single threaded to the tokio main. How come? What are these threads doing? Can I get rid of them?
#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
loop {
tokio::time::sleep(Duration::from_secs(1)).await;
}
}