auto commit

This commit is contained in:
CyC2018
2020-01-09 00:52:33 +08:00
parent 5f005e2263
commit f84b140418
4 changed files with 12 additions and 10 deletions

View File

@ -208,7 +208,7 @@ else
select poll 的功能基本相同不过在一些实现细节上有所不同
- select 会修改描述符 poll 不会
- select 的描述符类型使用数组实现FD_SETSIZE 大小默认为 1024因此默认只能监听 1024 个描述符如果要监听更多描述符的话需要修改 FD_SETSIZE 之后重新编译 poll 没有描述符数量的限制
- select 的描述符类型使用数组实现FD_SETSIZE 大小默认为 1024因此默认只能监听少于 1024 个描述符如果要监听更多描述符的话需要修改 FD_SETSIZE 之后重新编译 poll 没有描述符数量的限制
- poll 提供了更多的事件类型并且对描述符的重复利用上比 select
- 如果一个线程对某个描述符调用了 select 或者 poll另一个线程关闭了该描述符会导致调用结果不确定