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
|
.. 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.
|
This is a straightforward interface to the Unix :cfunc:`select` system call.
|
||||||
The first three arguments are sequences of 'waitable objects': either
|
The first three arguments are sequences of 'waitable objects': either
|
||||||
integers representing file descriptors or objects with a parameterless method
|
integers representing file descriptors or objects with a parameterless method
|
||||||
named :meth:`fileno` returning such an integer. The three sequences of
|
named :meth:`fileno` returning such an integer:
|
||||||
waitable objects are for input, output and 'exceptional conditions',
|
|
||||||
respectively. Empty sequences are allowed, but acceptance of three empty
|
* *rlist*: wait until ready for reading
|
||||||
sequences is platform-dependent. (It is known to work on Unix but not on
|
* *wlist*: wait until ready for writing
|
||||||
Windows.) The optional *timeout* argument specifies a time-out as a floating
|
* *xlist*: wait for an "exceptional condition" (see the manual page for what
|
||||||
point number in seconds. When the *timeout* argument is omitted the function
|
your system considers such a condition)
|
||||||
blocks until at least one file descriptor is ready. A time-out value of zero
|
|
||||||
specifies a poll and never blocks.
|
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
|
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
|
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
|
.. index:: single: WinSock
|
||||||
|
|
||||||
File objects on Windows are not acceptable, but sockets are. On Windows, the
|
File objects on Windows are not acceptable, but sockets are. On Windows,
|
||||||
underlying :cfunc:`select` function is provided by the WinSock library, and does
|
the underlying :cfunc:`select` function is provided by the WinSock
|
||||||
not handle file descriptors that don't originate from WinSock.
|
library, and does not handle file descriptors that don't originate from
|
||||||
|
WinSock.
|
||||||
|
|
||||||
|
|
||||||
.. _epoll-objects:
|
.. _epoll-objects:
|
||||||
|
|
Loading…
Reference in New Issue