News for hackers. Stuff that matters.
Re:The Rust I wanted had no future by astrange on Monday June 05, 2023 @09:24PM (#36206867)
A notable and common thing about this article is that it confidently declares futures/promises are good for parallelism, but this is wrong - they are flawed because they introduce priority inversions.

To schedule tasks properly, you need to know who is waiting on them as early as possible. With a promise, you only know when you get to the "wait()" call, which is too late.

The correct solution is called structured concurrency.

Re:The Rust I wanted had no future by svieira on Tuesday June 06, 2023 @02:20PM (#36216978)
Depends on if you're using Monix/Haskell style tasks (lazy, run when depended on) or JS-style promises (E Promise / C# Task / Java Future - run when instantiated, waiting is post-submission). Agreed completely though, structured concurrency is fantastic.