3 ms·
Rust async semantics are complex because they need to support resumable computations on a single C-style stack. It has nothing to do with concurrency, which was
by u320 3y ago
Rust async semantics are complex because they need to support resumable computations on a single C-style stack. It has nothing to do with concurrency, which was already supported, but at the cost of multiple stacks (either green threads at one point or OS threads). Futures just happen to be a very prominent example of resumable computations. Generator functions is another.