HeadlinesBriefing favicon HeadlinesBriefing.com

Async/Await Concurrency Pitfalls

Hacker News •
×

Over the last decade, async/await has won the concurrency wars because it is exceptionally easy. It lets developers write asynchronous code that looks virtually identical to synchronous code, but beneath that familiar syntax lies massive structural complexity. Rich Hickey summed it up: “Easy” is familiar, Rob Pike noted that async/await is easier for language implementers but pushes complexity onto programmers.

The core trap is conflating asynchrony with concurrency: developers write an async function as if it were blocking. When a task parses a 10MB JSON payload or runs a CPU‑heavy cryptographic proof, the cooperative executor stalls, causing latency spikes and OOM crashes.

The second failure mode is unbounded capacity: calling Tokio spawn is cheap, but without back‑pressure the system queues indefinitely until the OS kills it. Work‑stealing, while attractive, destroys cache locality and hurts throughput on large cores, as Whats App’s BEAM experience shows.

The result is Project Tina, a thread‑per‑core framework that eliminates async/await, offers strict cache locality, bounded mailboxes, and predictable load shedding. It gives developers explicit control, avoiding the hidden complexity that async runtimes impose.