Earlier quoted context omitted.
I think a key distinction is that in many application-level languages, each thing you await exists autonomously and keeps doing things in the background whether you await it or not. In system-level languages like Rust (and presumably Zig) the things you await are generally passive, and only make forward progress if the caller awaits them. This is an artifact of wanting to write async code in environments where "threa…
I think that notion is very specific to Rust's design. Golang for example doesn't have that trait, where the user (or their runtime) must drive a future towards completion by polling.
Asynchrony is not concurrency
51–60 of 228 posts
Re: Asynchrony is not concurrency
#52The author does not seem to have made any non-trivial projects with asynchronicity. All the pitfalls of concurrency are there - in particular when executing non-idempotent functions multiple times before previous executions finish, then you need mutexes!
This is one of those "in practice, theory and practice are different" situations.
There is nothing in the async world that looks like a parallel race condition. Code runs to completion until it deterministically yields, 100% of the time, even if the location of those yields may be difficult to puzzle out.
And so anyone who's ever had to debug and reason about a parallel race condition is basically laughing at that statement. It's just not the same.
Re: Asynchrony is not concurrency
#53Blocking async code is not async. In order for something to execute "out of order", you must have an escape mechanism from that task, and that mechanism essentially dictates a form of concurrency. Async must be concurrent, otherwise it stops being async. It becomes synchronous.
Re: Asynchrony is not concurrency
#54It's kind of true... I can do a lot of things asynchronously. Like, I'm running the dishwasher AND the washing machine for laundry at the same time. I consider those things not occurring at "the same time" as they're independent of one another. If I stood and watched one finish before starting the other, they'd be a kind of synchronous situation. But, I also "don't care". I think of things being organized concurrentl…
In that case, asynchronous just means the state that two or more tasks that should be synchronized in some capacity for the whole behavior to be as desired, is not properly in-sync, it's out-of-sync.
Then I feel there can be many cause of asynchronous behavior, you can be out-of-sync due to concurent execution or due to parallel execution, or due to buggy synchronization, etc.
And because of that, I consider asynchronous programming as the mechanisms that one can leverage to synchronize asynchronous behavior.
But I guess you could also think of asynchronous as doesn't need to be synchronized.
Also haven't read the article yet lol
Re: Asynchrony is not concurrency
#55IMO the author is mixed up on his definitions for concurrency. https://lamport.azurewebsites.net/pubs/time-clocks.pdf
Re: Asynchrony is not concurrency
#56Blocking async code is not async. In order for something to execute "out of order", you must have an escape mechanism from that task, and that mechanism essentially dictates a form of concurrency. Async must be concurrent, otherwise it stops being async. It becomes synchronous.
So I guess you could define this scenario as asynchronous.
Re: Asynchrony is not concurrency
#57Re: Asynchrony is not concurrency
#58Earlier quoted context omitted.
The article understands this.
> Concurrency: the ability of a system to progress multiple tasks at a time, be it via parallelism or task switching. Okay, but don't go with this definition.
For single threaded programs, whether it is JS's event loop, or Racket's cooperative threads, or something similar, if Δt is small enough then only one task will be seen to progress.
Re: Asynchrony is not concurrency
#59Earlier quoted context omitted.
The difference is quite useful and informative. In fact, most places don't seem to state it strongly enough: Concurrency is a programming model. Parallelism is an execution model. Concurrency is writing code with the appearance of multiple linear threads that can be interleaved. Notably, it's about writing code . Any concurrent system could be written as a state machine tracking everything at once. But that's really…
When you define some concepts, those definitions and concepts should help you better understand and simplify the descriptions of things. That's the point of definitions and terminology. You are not achieving this goal, quite the opposite in fact, your description is confusing and would never actually be useful in understanding, debugging, or writing software. Stated another way: if we just didn't talk about concurren…
They're just different names for different things. Not caring that they're different things makes communication difficult. Why do that to people you intend to communicate with?
Re: Asynchrony is not concurrency
#60IMO the author is mixed up on his definitions for concurrency. https://lamport.azurewebsites.net/pubs/time-clocks.pdf
The author is aware that definitions exist for the terms he uses in his blog post. He is proposing revised definitions. As long as he is precise with his new definitions, this is fine. It is left to the reader to decide whether to adopt them.
No thanks.