Skip to main content

What it flags

A direct std::thread::sleep or std::fs::read in an async function can block an executor thread. The check skips synchronous functions and nested closures, including closures handed to a blocking worker. An async block inside an async function is checked when it is directly awaited or passed to a recognized Tokio spawn call. The same applies when a simple local binding is awaited or spawned by the next statement. Deferred blocks need visible evidence that they run. Use the async equivalent or move synchronous work to a blocking worker supplied by the application.