Why is async code in Rust considered especially hard compared to Go or just threads?

124 points m_hans_223344

I've read recently that using async Rust is much harder than Go (gorountines) or just threads. I wonder why?

As an example, let's say we need to run some cpu heavy operation (let's say 3 seconds blocking a thread) within a web service.

  1. Async Rust with Tokio just blocking the task

  2. Async Rust with Tokio using spawn_blocking

  3. Go just blocking the goroutine

  4. Go scheduling the cpu heavy work on a new goroutine

I don't see why blocking in Rust (1.) is more harmful than blocking in Go (3.).

And why spawning a new thread in Rust (2.) is more difficult or more dangerous (if at all) than spawning a new goroutine (4.)?