Synchronous, asynchronous is the API is called by the method of notification, focus on the way of collaboration, blocking, non-blocking API caller's wait mode, the focus is on the execution state of the thread. As an example:
1, you go to the bookstore to buy books, see the boss asked him if he has "slam dunk", the boss said no, and then you just wait here, or go back a few days to run to ask the boss there is no, until the book (of course, also may boss has not entered this book, then you can only continue to run down ...) ), this is the synchronization
2, or you, and go to the bookstore to buy books, this time to buy is "The King of Thieves" bar, the boss said no (no way, the child is too bad), but this time you and the boss agreed, the book to call you, after a few days, the boss informed you the book, shouted you to buy, this is asynchronous
3, buy "slam dunk" when, if you have been waiting for nothing to do until you buy a book, is blocking; If you are not a book to run back to play a few days, do some of their own things, every few days in the reading to read to No, until the book, which is non-blocking
4, buy "King of Thieves" time, the book has not arrived, you will also have some fun, watching movies play games, this is asynchronous non-blocking
Summarize:
1, synchronous and asynchronous: Synchronization refers to the caller actively get the return value of a function call, asynchronous refers to the callee when the function is returned when the active notification to the caller can get the return value
2, blocking, and non-blocking: blocking refers to the fact that a thread can do nothing (discard CPU time slices) while waiting for the return value of a function call, rather than blocking refers to the thread doing other things in the process
synchronous, asynchronous, blocking, non-blocking