In this Java Threads course by Peggy Fisher (on LinkedIn) it says, asynchronous is concurrent. Is this correct or incorrect? I was watching this online course and wondered if the definition is incorrect. (I have always understood it to mean, 'not synchronized').
-
Sounds right to me. – Subir Kumar Sao Nov 20 '19 at 02:21
-
Does this answer your question? [What is the difference between concurrency, parallelism and asynchronous methods?](https://stackoverflow.com/questions/4844637/what-is-the-difference-between-concurrency-parallelism-and-asynchronous-methods) – MyStackRunnethOver Nov 20 '19 at 02:39
3 Answers
Asynchronous means:
- it can run concurrently "now" on a different thread on the same processor (task switching) or a thread on a different processor (parallelism) or
- a little later but still concurrent with the piece of code that created this task and submitted it for execution or
- it can run hours later after the calling piece of code has finished execution
The essential thing to understand is that the piece of code that created this task running on a thread does "not need" to block and wait for this task to be completed.
The task is not guaranteed to run at a specific time interval and the main thread does not need to block waiting for the completion of this task.
Let's say that Code C
running on Thread M
creates a Task T
and submits it for asynchronous execution. Now there are two things:
T
runs concurrently as is specified here on a different ThreadT'
(same processor giving the appearance of parallelism) or a different processor - actual parallelism)T
runs at some time even hours later on a different ThreadT'
or perhaps is picked up by the same threadM
.
Both of these outcomes are possible. And they depend on what the logic implemented by your code is.
However there is a related concept that should clarify the concepts further. And that is the clarification of parallel and concurrent.
There is another post that has a schematic defining the subtle differences between "asynchrony", "concurrency" and "parallelism".
I can regurgitate the difference but there is already a post that is very succinct and the answers are clear as well.

- 4,872
- 2
- 28
- 42

- 3,627
- 1
- 23
- 25
-
I was thinking of asynchronous = no synchronized clock, as in asynchronous communications. – likejudo Nov 20 '19 at 15:30
-
Not like that, could be different clock pulse. The term has a different connotation. – Khanna111 Dec 04 '19 at 05:55
In this Java Threads course by Peggy Fisher (on LinkedIn) it says, asynchronous is concurrent.
I think that is a misreading. The actual wording is:
"Asynchronous indicates that [the task] can run concurrently"
What it is saying that asynchronous tasks can run concurrently. It doesn't say that they will run concurrently.
In particular, there are frameworks, languages, hardware where asynchronous tasks (in general) are executed on the same thread of control ... when the current activity suspends itself.
The wording is both technically correct, and a general enough to cover common uses of the term.

- 698,415
- 94
- 811
- 1,216
-
I was thinking of asynchronous = no synchronized clock, as in asynchronous communications. – likejudo Nov 20 '19 at 15:30
-
1Synchronized clocks are nothing to do with async mode communication. – Stephen C Nov 21 '19 at 00:06
It says, asynchronous is concurrent.
No, it doesn't. The definition in the course is written correctly. it(asynchronous task) can run concurrently.
If tasks are synchronous, each of them runs only one at a time after another.

- 7,825
- 12
- 32
- 42
-
I was thinking of asynchronous = no synchronized clock, as in asynchronous communications. – likejudo Nov 20 '19 at 15:30