std::thread — OS thread. tokio::spawn — async task.
std::thread:
tokio::spawn:
1use std::thread;23thread::spawn(|| {4 println!("Blocking work");5});67tokio::spawn(async {8 println!("Async work");9});
Key: tokio::spawn for async, std::thread for blocking.