Mehdi Akiki

Posts tagged "async rust"

  • 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 2 of 3 · Async Rust under the hood

    Async fn in a dyn Trait: What the Box Costs, Measured

    Calling an async method through dyn Trait needs a boxed future. I measured what that box costs per call, with an allocation counter and a million calls, and where it actually matters.
  • 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.