@@ -535,11 +535,11 @@ msgstr "忽略"
535535msgid ""
536536":const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5 "
537537"or later."
538- msgstr ""
538+ msgstr "增加了 :const:`EPOLLEXCLUSIVE`。仅支持 Linux Kernel 4.5 或更高版本。 "
539539
540540#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:326
541541msgid "Close the control file descriptor of the epoll object."
542- msgstr ""
542+ msgstr "关闭用于控制 epoll 对象的那个文件描述符。 "
543543
544544#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:331
545545msgid "``True`` if the epoll object is closed."
@@ -548,7 +548,7 @@ msgstr "如果 epoll 对象已关闭,则返回 ``True``。"
548548#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:336
549549#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:475
550550msgid "Return the file descriptor number of the control fd."
551- msgstr ""
551+ msgstr "返回用于控制 epoll 对象的文件描述符对应的数字。 "
552552
553553#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:341
554554msgid "Create an epoll object from a given file descriptor."
@@ -585,6 +585,11 @@ msgid ""
585585"O(highest file descriptor), while :c:func:`poll` is O(number of file "
586586"descriptors)."
587587msgstr ""
588+ "大多数 Unix 系统支持 :c:func:`poll` "
589+ "系统调用,为服务器提供了更好的可伸缩性,使服务器可以同时服务于大量客户端。:c:func:`poll` "
590+ "的伸缩性更好,因为该调用内部仅列出所关注的文件描述符,而 :c:func:`select` 会构造一个 bitmap,在其中将所关注的描述符所对应的 "
591+ "bit 打开,然后重新遍历整个 bitmap。因此 :c:func:`select` 复杂度是 O(最高文件描述符),而 :c:func:`poll` "
592+ "是 O(文件描述符数量)。"
588593
589594#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:392
590595msgid ""
@@ -593,6 +598,8 @@ msgid ""
593598":const:`POLLPRI`, and :const:`POLLOUT`, described in the table below. If "
594599"not specified, the default value used will check for all 3 types of events."
595600msgstr ""
601+ "*eventmask* 是可选的位掩码,用于指定要检查的事件类型,它可以是常量 :const:`POLLIN`、:const:`POLLPRI` 和 "
602+ ":const:`POLLOUT` 的组合,如下表所述。如果未指定本参数,默认将会检查所有 3 种类型的事件。"
596603
597604#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:400
598605msgid ":const:`POLLIN`"
@@ -642,7 +649,7 @@ msgstr ":const:`POLLRDHUP`"
642649msgid ""
643650"Stream socket peer closed connection, or shut down writing half of "
644651"connection"
645- msgstr "流套接字对等体关闭连接,或关闭写入一半连接 "
652+ msgstr "流套接字的对侧关闭了连接,或关闭了写入到一半的连接 "
646653
647654#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:413
648655msgid ":const:`POLLNVAL`"
@@ -686,6 +693,12 @@ msgid ""
686693"negative, or :const:`None`, the call will block until there is an event for "
687694"this poll object."
688695msgstr ""
696+ "轮询已注册的文件描述符的集合,并返回一个列表,列表可能为空,也可能有多个 ``(fd, event)`` "
697+ "二元组,其中包含了要报告事件或错误的描述符。*fd* 是文件描述符,*event* 是一个位掩码,表示该描述符所报告的事件 --- "
698+ ":const:`POLLIN` 表示可以读取,:const:`POLLOUT` "
699+ "表示该描述符可以写入,依此类推。空列表表示调用超时,没有任何文件描述符报告事件。如果指定了 "
700+ "*timeout*,它将指定系统等待事件时,等待多长时间后返回(以毫秒为单位)。如果 *timeout* 为空、负数 或 "
701+ ":const:`None`,则本调用将阻塞,直到轮询对象发生事件为止。"
689702
690703#: /home/travis/build/python/cpython-doc-catalog/Doc/library/select.rst:461
691704msgid "Kqueue Objects"
0 commit comments