-2

What is the differnce between synchronus and asynchronus method?

I found this q/a from codeverge

When you call a synchronous method, it does the work and then returns the result (success, failure, maybe nothing is returned).

When you call an asychronous method, it returns immediately (and your program can go on its merry way). When the work is done, it will call a function that you provide. The works is done in parallel with the program running.

But really couldn't understand properly.

Does anyone have clear concept on this?

Navin Rauniyar
  • 10,127
  • 14
  • 45
  • 68
  • http://stackoverflow.com/questions/7131991/asynchronous-and-synchronous-terms – Suraj Singh Jun 26 '14 at 11:49
  • oh! thank you I wasn't able to find that. – Navin Rauniyar Jun 26 '14 at 11:49
  • @Juhana: The accepted answer in that thread talks about threads, which may further confuse the Op (in context of Javascript). Something which is discussed here: http://stackoverflow.com/questions/8963209/does-async-programming-means-multi-threading – Abhitalks Jun 26 '14 at 11:53
  • Fortunately there are 8 other answers if the accepted answer doesn't explain it clearly enough. – JJJ Jun 26 '14 at 11:55
  • Check this. http://stackoverflow.com/questions/748175/asynchronous-vs-synchronous-execution-what-does-it-really-mean – Mahesh K Oct 23 '16 at 08:26

1 Answers1

9

Buy a book.

You can go to your local book store, stand a queue, wait while a cashier gets her makeup ready, then pay for it and own it. That will be synchronous.

Or, you can order it instantly on Amazon, and go to other things in your life. When it's there, they ring at your door and you get the book asynchronously.

georg
  • 211,518
  • 52
  • 313
  • 390