- Please explain "asynchronous" and "synchronous" in programming in general with an example.
- What are the main benefits?
Loading
- Please explain "asynchronous" and "synchronous" in programming in general with an example.
- What are the main benefits?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rijwan AnsariRank #82 · 24.2K reputationPosted Jul 3, 2021, 3:33 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted Jul 3, 2021, 5:53 AM EDT
there are 3 things sync, async and parallel, sync means one after another, async means not parallel but without blocking the calling thread.
There is a huge misconception that async means parallel, we all know that javascript is based on a single thread model yet we can use async-await there so what does it mean javascript can really do things in parallel, no not at all, it just won't block the UI.
For example, suppose we are discussing a feature that uploads files. If you say its parallel i assume i can upload multiple files simultaneously. If you say its asynchronous i assume that i can upload one file and the UI thread is not blocked while it is uploading. The difference is subtle but significant.
Satya KarkiRank #78 · 24.6K reputationPosted Jul 3, 2021, 1:47 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jul 3, 2021, 3:14 AM EDT
Amit Kumar SinghRank #562 · 4.3K reputationPosted Jul 3, 2021, 5:58 AM EDT
Hi,
Regards,
Amit
Charles Andersen7 reputationPosted Jul 4, 2021, 11:08 PM EDT