• Post Reply Bookmark Topic Watch Topic
  • New Topic

synchronous or asynchronous??  RSS feed

 
Bhargo Dev Arya
Greenhorn
Posts: 8
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone....

Ia m still confused about what exactly is meant by asynchronous and synchronous event???


can any one please explain what is meant by these terms???

thanks
bhargo
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

syn·chro·nous
adjective
1. occurring at the same time; coinciding in time; contemporaneous; simultaneous.
2. going on at the same rate and exactly together; recurring together.


a·syn·chro·nous
adjective
1. not occurring at the same time.
2. (of a computer or other electrical machine) having each operation started only after the preceding operation is completed.

asynchronism
— n
a lack of synchronism; occurrence at different times

Source : http://dictionary.reference.com
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bhargo Dev Arya wrote:Ia m still confused about what exactly is meant by asynchronous and synchronous event???

A synchronous event is an event that is part of a set of events related to each other by time (usually because they must occur in a specific sequence). Asynchronous simply means "not synchronous".

You find it most often when dealing with communication styles or protocols. RMI is an example of a synchronous protocol since the caller must sit and wait (this is referred to as 'blocking') until the called method has completed its task. Many messaging protocols, such as JMS, on the other hand, are asynchronous: when a program sends a message, it doesn't necessarily need to wait around for a reply.

Winston
 
Matthew Brown
Bartender
Posts: 4568
9
  • Likes 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To give you a "real-life" example: telephone is a synchronous communication. You speak and wait for a response. The person at the other end has to be listening at the time. Email is asynchronous - you fire off an email, and go and do something else. The other person can pick it up whenever, and reply when they like.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!