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

# SIFR-ASYNC-0005: Blocking offload target is not classified as blocking I/O or CPU-heavy work.

> Blocking offload target is not classified as blocking I/O or CPU-heavy work.

`SIFR-ASYNC-0005` belongs to the **Async effect and awaitability** diagnostic family. It means: blocking offload target is not classified as blocking I/O or CPU-heavy work.

## Why It Happens

Sifr tracks suspension and blocking effects statically. This diagnostic fires when async code either does not really suspend, awaits work that cannot suspend, or calls blocking/CPU-heavy work without an explicit offload boundary.

<Info>
  Use `sifr --explain SIFR-ASYNC-0005` locally to see the renderer's exact message template and any machine-applicable suggestions for the compiler version you are running.
</Info>

## Erroneous Code

```python theme={null}
async def main() -> int:
    return await task.spawn_blocking(lambda: 42)
```

## How To Fix It

Only offload functions classified as blocking I/O or CPU-heavy work; otherwise leave ordinary synchronous helpers synchronous.

## Fixed Code

```python theme={null}
def blocking_read() -> str:
    return read_text("config.txt")

async def main() -> str:
    return await task.spawn_blocking(blocking_read)
```

## Details

| Field                  | Value                                                                 |
| ---------------------- | --------------------------------------------------------------------- |
| Code                   | `SIFR-ASYNC-0005`                                                     |
| Family                 | `ASYNC`                                                               |
| Severity               | Error                                                                 |
| Stability              | stable                                                                |
| Owner                  | `sifr_lowering::lower::workload_annotations`                          |
| Representative fixture | `crates/sifr/tests/e2e/fail/spawn_blocking_unannotated_rejected.sifr` |

See the [Error Codes index](/diagnostics/error-codes) for the complete catalog.
