The concepts of asynchronous and synchronous programming #111300
Unanswered
Symasoiti97
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What do you say about my thoughts?
Synchronicity is when two or more actions are performed at the same time.
Asynchrony is when two or more actions are performed not at the same time.
Based on these definitions, we can determine which two actions are meant: the first action is waiting, the second action is doing some work on the other side.
Asynchronous programming allows these two actions to be performed asynchronously, that is, not at the same time.
What is the advantage of performing these two actions asynchronously?
Because waiting is useless work that needs to be done by the current code execution thread, while other (useful) action is performed on the other side. We want to free the thread from waiting in order to give it the opportunity to do something else useful.
You should also understand that doing some work on the side may be either another thread of our process, or another process.
Beta Was this translation helpful? Give feedback.
All reactions