~/talk

"Cancelling Async Rust"

Talkat RustConf 2025 · 2025-09-02..09-05· [concurrency, rust]
name:Rain
links:none on file
slides:none on file

Async Rust makes cancellation trivial because futures are passive and dropping them at any await point cancels child work; that causes real bugs: lost MPSC sends, invariant violations when awaiting while holding Tokio mutexes, and try_join/select canceling sibling shutdowns. Practical fixes used at Oxide include reserving channel slots, using write_all_buf for partial progress, pinning or spawning tasks so work runs to completion, and preferring an actor model over Tokio mutexes; these patterns reduce but do not eliminate cancellation failures.

AI-written summary · about

  1. 0:00Introduction to Cancellation
  2. 13:06Analyzing Safety Concepts
  3. 17:47Tokio Mutex Hazards
  4. 21:13Common Cancellation Patterns
  5. 25:10Making Futures Safe
  6. 30:02Advanced Prevention Strategies
  7. 35:20Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.