News for hackers. Stuff that matters.
Re:Async Rust Is A Bad Language by zamalek on Friday September 08, 2023 @02:38PM (#37437596)
> A safe async language must guarantee that threads will make progress.

You might be looking for parallelism, not concurrency.

Re:Async Rust Is A Bad Language by brickteacup on Friday September 08, 2023 @05:58PM (#37439889)
No? You don't need parallelism to guarantee global progress as long as the scheduler has the ability to preempt tasks. Of course coroutines (as opposed to e.g. userspace threads) can't really be preempted, which is the issue here.
Re:Async Rust Is A Bad Language by zamalek on Friday September 08, 2023 @11:45PM (#37442077)
> parallelism to guarantee global progress as long as the scheduler has the ability to preempt task

Preempting tasks is a single-core simulation of parallelism. I suspect there is confusion about what parallelism and concurrency are here: the terms are often used interchangeably (especially saying "concurrency" instead of "parallelism"), but they are definitely not interchangeable - or even, arguably, related at all. Concurrency, by definition, is concerned with continuations. If you remove continuations (async/await and/or futures/promises - depending on the language choices) then you aren't talking about concurrency any more.

Either way, you can use parallelism is Rust today - just use blocking APIs, locking, and threads. I don't get what the big deal is. You can even use concurrency and parallelism together, just use await/async across multiple threads.

I agree with the premise of the article, but the reasoning in this comment chain is something along the lines of "cats are horrible, because 5." The criticism is foreign to the entire subject matter.

Re:Async Rust Is A Bad Language by kprotty on Saturday September 09, 2023 @01:30PM (#37447834)
Preemption simulates localized concurrency (running multiple distinct things logically at the same time) not parallelism (running them physically at the same time). You can have concurrency outside continuations. OS threads for example are not continuations, but still express concurrency to the kernel so that it can (not guaranteed) express concurrency to the physical CPU cores which hopefully execute the concurrent code in parallel (not guaranteed again, due to hyperthreading).