Cancel the Stream or Release the Reader? Those Are Different Decisions
Cancel discards the remaining stream data and requests source cleanup. Releasing a lock leaves the stream for another reader.
Topic · 8 stories
8 stories tagged async on AI Tamer, newest first.
Cancel discards the remaining stream data and requests source cleanup. Releasing a lock leaves the stream for another reader.
A file descriptor is just a number, so safe Rust code could hand any number to an API that trusts it. I/O safety closes that gap with OwnedFd and BorrowedFd. In October 2026 tokio deprecated four safe AsyncFd constructors for breaking it.
One blocking call in a Tokio task can stall every other task on that thread. How to recognise blocking work, when spawn_blocking is the answer, and when a dedicated thread is the better one.
Choose a Tokio channel by what each receiver needs after a pause: the latest value or messages sent in order.
A standard mutex works well for short updates in async Rust. Learn when holding its guard across an await can deadlock, and when Tokio’s async mutex is worth its cost.
Tokio’s fair semaphore can make a small request wait behind a large one, even while a permit is available. Here is why and what to check.
Rust runs `Drop` when values are destroyed, but `Drop` cannot await a future. Give asynchronous resources an explicit shutdown path while `AsyncDrop` remains experimental.
A losing tokio::select! branch is dropped. This explainer traces interrupted I/O and shows how to review each await before retrying an operation.