News for hackers. Stuff that matters.
Re:Await in Rust by hinkley on Monday August 12, 2019 @03:02PM (#20678730)
I was about to say we are essentially talking ourselves back into green threads but I think you may be right about CPS.

However, the paradox you have to manage here is this: if you make this sequential/parallel determination pretty high up in the code so that there is a lot of sequential code right after an async part (async can call sync all it wants), then very little of your code is altered, but now you have the green threads problem - one long CPU-bound task that doesn’t yield.

At least with Rust, if you’ve partitioned your data properly then there can be several threads of execution running tasks on unrelated data, but in Javascript you will be punished for trying to consolidate the async bits in this fashion.

There are no comments on this comment yet.