Clarify the meaning of the select() parameters and sync
names with docstring.
This commit is contained in:
parent
40df8ecdd5
commit
e7829a5b1b
|
@ -58,19 +58,24 @@ The module defines the following:
|
|||
.. versionadded:: 2.6
|
||||
|
||||
|
||||
.. function:: select(iwtd, owtd, ewtd[, timeout])
|
||||
.. function:: select(rlist, wlist, xlist[, timeout])
|
||||
|
||||
This is a straightforward interface to the Unix :cfunc:`select` system call.
|
||||
The first three arguments are sequences of 'waitable objects': either
|
||||
integers representing file descriptors or objects with a parameterless method
|
||||
named :meth:`fileno` returning such an integer. The three sequences of
|
||||
waitable objects are for input, output and 'exceptional conditions',
|
||||
respectively. Empty sequences are allowed, but acceptance of three empty
|
||||
sequences is platform-dependent. (It is known to work on Unix but not on
|
||||
Windows.) The optional *timeout* argument specifies a time-out as a floating
|
||||
point number in seconds. When the *timeout* argument is omitted the function
|
||||
blocks until at least one file descriptor is ready. A time-out value of zero
|
||||
specifies a poll and never blocks.
|
||||
named :meth:`fileno` returning such an integer:
|
||||
|
||||
* *rlist*: wait until ready for reading
|
||||
* *wlist*: wait until ready for writing
|
||||
* *xlist*: wait for an "exceptional condition" (see the manual page for what
|
||||
your system considers such a condition)
|
||||
|
||||
Empty sequences are allowed, but acceptance of three empty sequences is
|
||||
platform-dependent. (It is known to work on Unix but not on Windows.) The
|
||||
optional *timeout* argument specifies a time-out as a floating point number
|
||||
in seconds. When the *timeout* argument is omitted the function blocks until
|
||||
at least one file descriptor is ready. A time-out value of zero specifies a
|
||||
poll and never blocks.
|
||||
|
||||
The return value is a triple of lists of objects that are ready: subsets of the
|
||||
first three arguments. When the time-out is reached without a file descriptor
|
||||
|
@ -90,9 +95,10 @@ The module defines the following:
|
|||
|
||||
.. index:: single: WinSock
|
||||
|
||||
File objects on Windows are not acceptable, but sockets are. On Windows, the
|
||||
underlying :cfunc:`select` function is provided by the WinSock library, and does
|
||||
not handle file descriptors that don't originate from WinSock.
|
||||
File objects on Windows are not acceptable, but sockets are. On Windows,
|
||||
the underlying :cfunc:`select` function is provided by the WinSock
|
||||
library, and does not handle file descriptors that don't originate from
|
||||
WinSock.
|
||||
|
||||
|
||||
.. _epoll-objects:
|
||||
|
|
Loading…
Reference in New Issue