Mehdi Akiki

Posts tagged "spawn_blocking"

  • Published on
    A synchronous function inside async Rust occupies an executor worker until it returns. A one-worker timer trace makes the delay visible and shows where spawn_blocking helps—and where it does not.
  • Published on

    Reference · Through the layers

    Understanding Tokio Task Functions

    Explore how Tokio's spawn, spawn_blocking, and block_on functions allow efficient handling of asynchronous, blocking, and CPU-heavy tasks in Rust applications, with practical use cases for each.