The difference between non-blocking IO and asynchronous IO

https://www.cnblogs.com/euphie/p/6376508.html
http://blog.chinaunix.net/uid-26000296-id-3754118.html
Non-blocking
call means that the call will not be called until the result cannot be obtained immediately will block the current thread.
A blocking call means that the current thread is suspended until the result of the call is returned. The function does not return until it has a result.
The concepts of non-blocking and blocking correspond to each other, which means that the function will not block the current thread until the result cannot be obtained immediately, but will return immediately. Asynchronous

The concept of asynchrony is the opposite of synchronization. When an asynchronous procedure call is issued, the caller does not get the result immediately. The part that actually handles the call is to notify the caller through status, notification, or handle the call through a callback function after the call is made. IO and NIO are fundamentally different in actual project usage scenarios and how to use them:






Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326252113&siteId=291194637