Java common synchronization and asynchronous differences, characteristics, contact synchronization: Send a request, wait to return, and then send the next request
Asynchronous: Sends a request, does not wait to return, can send the next request at any time
Synchronization can avoid deadlocks, read dirty data, generally share a resource when used, if everyone has modify permissions, while modifying a file, it is possible for one person to read what another person has deleted, error, synchronization will be in order to modify.
Asynchronous is to improve efficiency, now the CPU is dual-core, four-core, asynchronous processing can be multi-task at the same time, of course, it must be guaranteed to be processed concurrently.
These are all right.
The biggest difference between synchronous and asynchronous is. One needs to wait, one does not need to wait.
Broadcast, for example, is an asynchronous example. The initiator does not care about the recipient's status. No need to wait for the recipient's return information
Telephone, is a synchronous example. The initiator waits for the receiver, and the communication begins when the phone is connected. Need to wait for the recipient's return information reproduced from csdn--Litaibai not white http://blog.csdn.net/daguairen/article/details/52515264
Common synchronization and asynchronous differences, features, and connections in Java