- 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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Charles AndersenPosted Jul 5, 2021, 3:08 AM
Amit Kumar SinghPosted Jul 3, 2021, 9:58 AM
Hi,
Regards,
Amit
Sachin SinghPosted Jul 3, 2021, 9:53 AM
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.
Rijwan AnsariPosted Jul 3, 2021, 7:33 AM
Rajanikant HawaldarPosted Jul 3, 2021, 7:14 AM
Satya KarkiPosted Jul 3, 2021, 5:47 AM