Mehdi Akiki

Posts tagged "concurrency"

  • Published on

    Article · Interrupted execution

    Preventing an OAuth Token Refresh Stampede

    A concurrent refresh design using local single-flight work, database versions, conditional writes, and recovery rules for providers that rotate refresh tokens.
  • 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

    Reference · Interrupted execution

    Optimistic Locking With a Version Number

    Two requests read the same row, both change it, and the second save quietly erases the first. A version number turns that silent bug into a conflict you can catch. Here is how optimistic locking works.