kqueue()和O_NONBLOCK [英] kqueue() and O_NONBLOCK

查看:167
本文介绍了kqueue()和O_NONBLOCK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果你使用kqueue(),你应该在你的文件描述符上设置O_NONBLOCK吗?换句话说,kqueue()是否保证就绪文件描述符上的下一个I / O操作不会阻塞,无论是否设置了O_NONBLOCK?

If you use kqueue(), should you set O_NONBLOCK on your file descriptors? In other words, does kqueue() guarantee that the next I/O operation on a ready file descriptor will not block, regardless of whether O_NONBLOCK is set?

推荐答案


如果你使用kqueue(),你应该在文件描述符上设置O_NONBLOCK吗?

If you use kqueue(), should you set O_NONBLOCK on your file descriptors?

Nope。


换句话说,kqueue()是否保证就绪文件描述符上的下一个I / O操作不会阻止,无论是否设置了O_NONBLOCK?

In other words, does kqueue() guarantee that the next I/O operation on a ready file descriptor will not block, regardless of whether O_NONBLOCK is set?

是的。

这篇关于kqueue()和O_NONBLOCK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆