Why does async
not use the existing terms Promise
or Future
?
#269
-
As best I can tell, Or am I missing a fundamental difference between |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You are correct, the terminology is overloaded and in many cases, generally, over-complicated. I talked to this in some of my presentations. Having a clear understanding of "concurrency" vs "parallelism" is important. "Async" means "not existing or occurring at the same time" - the opposite of synchronous. I like to think of it as "code without (the consideration of actual) time". In my mind, "concurrent" (interleaved) execution and "parallel" (simultaneous) execution are both forms of asynchronous execution. The opposite is code which always executes with synchronisation between each step - i.e. synchronous execution. This is probably why we have "synchronisation primitives" which bring order to otherwise unpredictable asynchronous execution models. Most code is a combination of asynchronous and synchronous execution (Amdahl's law is a good context for this). It's common to use A More specifically, a
However, this is not strictly necessary - there are many ways a concurrent task could indicate completion - a queue could also be used. As such, the Ruby |
Beta Was this translation helpful? Give feedback.
You are correct, the terminology is overloaded and in many cases, generally, over-complicated.
I talked to this in some of my presentations. Having a clear understanding of "concurrency" vs "parallelism" is important.
"Async" means "not existing or occurring at the same time" - the opposite of synchronous. I like to think of it as "code without (the consideration of actual) time". In my mind, "concurrent" (interleaved) execution and "parallel" (simultaneous) execution are both forms of asynchronous execution. The opposite is code which always executes with synchronisation between each step - i.e. synchronous execution. This is probably why we have "synchronisation primitives" which bring …