Mehdi Akiki

Posts tagged "tokio"

  • Published on

    Investigation · Part 3 of 3 · Async Rust under the hood

    Async Cleanup in Rust When Drop Cannot Await

    Drop is synchronous, and a lease or session often needs an await to be released. I tried four ways to do the cleanup and measured which ones actually ran, including during runtime shutdown.
  • Published on

    Investigation · Part 1 of 3 · Async Rust under the hood

    How Async Rust Works Under the Hood: Five Symptoms, One Model

    I started from a small tokio service and hit five classic async Rust problems: a huge future, a future that is not Send, one blocking call that stalls everything, a select! loop that loses data, and a shutdown that hangs. One small model of the compiler and the runtime explains all five.
  • Published on

    Article · Interrupted execution

    Cancellation Safety in Async Rust, Explained

    Async cancellation usually means dropping a future after Pending. See how select loops lose partial progress and how to design restartable operations.
  • Published on

    Article · Through the layers

    Why a Rust Future Is Not Send Across .await

    A Rust future is Send only when every stored state is safe to move across threads. Trace captures and locals across await to fix spawn errors.
  • Published on
    A deep dive into what actually happens when you write #[tokio::main]. We'll tear apart the macro, expose the state machines, and reveal the work-stealing scheduler hiding beneath five lines of code.