> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# rust-blocking-std-in-async

> An async Rust function directly executes a synchronous standard-library call.

## 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.