找回密码
 用户注册

QQ登录

只需一步,快速开始

查看: 3955|回复: 0

what's the difference between async i/o (or socket)and non block i/o

[复制链接]
发表于 2008-9-21 15:06:39 | 显示全部楼层 |阅读模式
They are very different, as follows:
. AIO is "asynchronous I/O", i.e., the operation is invoked
  asynchronously and control returns to the client while the OS kernel
  processes the I/O request.  When the operation completes there is
  some mechanism for the client to retrieve the results.
. Non-blocking I/O tries an operation (such as a read() or write())
  and if it the operation would block (e.g., due to flow control on a
  TCP connection or due to lack of data in a socket), the call returns
  -1 and sets errno to EWOULDBLOCK.
Dr. Douglas C. Schmidt
您需要登录后才可以回帖 登录 | 用户注册

本版积分规则

Archiver|手机版|小黑屋|ACE Developer ( 京ICP备06055248号 )

GMT+8, 2024-12-22 21:58 , Processed in 0.016273 second(s), 7 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表