A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
OO, Patterns, UML and Refactoring
Synchronous and Asynchronous ???
Joined: May 09, 2005
May 24, 2006 06:40:00
Can you please tell the exact meanings of synchronous and asynchronous communications?
Joined: Jan 07, 1999
May 24, 2006 07:18:00
Synchronous is where the sender of a request sits around doing nothing waiting for a response.
Asynchronous is where a request is sent then the sender gets on with other stuff. Replies may come back later from the recipient.
Read about me at frankcarver.me
Raspberry Alpha Omega
Frank's Punchbarrel Blog
Joined: Jan 29, 2003
May 24, 2006 14:27:00
Conversation is usually synchronous. I say something, then wait for you to reply. During that wait it would be rude of me to do something else like play a game on my phone, so I don't.
But postal mail communication is asynchronous. I send you a letter and then go on with my life for a couple days. When you send a reply I rip it open and read it.
Ordinary method calls are synchronous. I call someobject.method() and block until that returns.
If I start another thread I may get an asynchronous reply. I can go on and do other things while the other thread runs, and it may call my object back some time in the future.
Message queuing is often (but not always) asynchronous. Any kind of multi-threaded program like a Swing UI can get into async territory, too.
Does that help?
[ May 24, 2006: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: Synchronous and Asynchronous ???
Synchronous and asynchronous GC
Synchronous or Asynchronous Method?
Synchronous & Asynchronous Arcitectures
Publisher/Sub and Point to Point..
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015