News for hackers. Stuff that matters.
Re:How to think about `async`/`await` in Rust by mgaunard on Wednesday July 05, 2023 @04:51AM (#36597626)
My opinion is the opposite, to the point I would argue that anyone advocating for multithreading for reasons other than executing things in parallel on different cores is extremely dangerous and shouldn't be allowed anywhere near a serious codebase.
Re:How to think about `async`/`await` in Rust by GolDDranks on Wednesday July 05, 2023 @05:29AM (#36597899)
Rust pretty much alleviates these dangers. At least no memory safety bugs because of multithreading. Logic bugs are still possible, of course, but the channel API and the scoped thread API in the standard library do help with those.
Re:How to think about `async`/`await` in Rust by mgaunard on Wednesday July 05, 2023 @05:40AM (#36597985)
That is not true at all, "fearless concurrency" gives no valuable guarantees at all and is widely seen as one of the worst concurrency models in literature.
Re:How to think about `async`/`await` in Rust by GolDDranks on Wednesday July 05, 2023 @06:03AM (#36598165)
I don't dispute that, but I thought you were having C++ with threads as the starting point, in which case Rust very much gives you valuable guarantees.
Re:How to think about `async`/`await` in Rust by pltzxy on Wednesday July 05, 2023 @04:56AM (#36597663)
Are you talking about Rust (which I don't know)? In Python the async people don't care much about correctness.
Re:How to think about `async`/`await` in Rust by mgaunard on Wednesday July 05, 2023 @05:41AM (#36597995)
It's language-agnostic. The language with the most advanced concurrency memory model is C++.
Re:How to think about `async`/`await` in Rust by psychphysic on Wednesday July 05, 2023 @04:55AM (#36597657)
Erlang/OTP has entered the chat.
Re:How to think about `async`/`await` in Rust by dom96 on Wednesday July 05, 2023 @07:02AM (#36598598)
I probably wouldn't go as far as saying "extremely dangerous" but I do agree. For the most popular use case (i.e. web services) a thread per core with an event loop in each thread is the best model.