Synchronous, asynchronous: Concept: Notification mechanism of the message to explain: related to the IO notification mechanism; The so-called synchronization, is to initiate the call, the caller processing the message, must wait for processing to directly return the result, not finished before is not returned, the caller actively wait for the result; is returned directly by the caller, but does not return the result, etc. when the message is processed, the caller is notified by state, notification, or callback function, and the caller passively receives the result. blocking, non-blocking: concept: The state of the program when it waits for the call result: It involves CPU thread scheduling; The so-called blocking, is the call result returned before the execution thread will be suspended, do not release the CPU execution power, the thread can not do other things, can only wait, Only wait until the result of the call is returned, can proceed to proceed; the so-called non-blocking, is not to get the call results, not always wait, the thread can be executed, if it is synchronized, through polling to check that there is no call results returned, if it is asynchronous, will notify the callback.
Classic Story case: characters: Old props: ordinary kettle (water boil not sound); the kettle (water burns out) case: &NBSP ; 1, sync blocking: &NBSP ; Old Zhang in the kitchen to boil water with a common kettle, has been waiting in the kitchen (blocking), staring at the boiling (sync); &NB Sp  2, asynchronous blocking: &NB An SP; old Zhang in the kitchen with a ring kettle boiling water, has been in the kitchen medium (blocking), until the kettle makes a noise (asynchronous), old Zhang know that the waters boil;
3, sync non-blocking: &NBSP ; Old Zhang in the kitchen with a common kettle to boil water, in the boiling water, to the living room to watch TV (non-blocking), And then go to the kitchen and watch the water boil. No & nbsp (poll check sync results);
4, asynchronous non-blocking: Old Zhang in the kitchen with a ring kettle boiling water, in the process of boiling water, to the living room to watch TV (not blocked), when the kettle makes a noise (asynchronous), Old Zhang will know The water has boiled away.
Note: 1, the usual IO, NIO operations, are synchronized; 2, JDK1.7 provides classes for AIO asynchronous operations, such as Asynchronoussocketchannel, Asynchronousserversocketchannel Java can also implement asynchronous operation through multiple threads, in the open thread, through callback. ......