6
6
7
7
--------------
8
8
9
- This module provides access to the :c:func: `select ` and :c:func: `poll ` functions
10
- available in most operating systems, :c:func: `devpoll ` available on
11
- Solaris and derivatives, :c:func: `epoll ` available on Linux 2.5+ and
12
- :c:func: `kqueue ` available on most BSD.
9
+ This module provides access to the :c:func: `! select ` and :c:func: `! poll ` functions
10
+ available in most operating systems, :c:func: `! devpoll ` available on
11
+ Solaris and derivatives, :c:func: `! epoll ` available on Linux 2.5+ and
12
+ :c:func: `! kqueue ` available on most BSD.
13
13
Note that on Windows, it only works for sockets; on other operating systems,
14
14
it also works for other file types (in particular, on Unix, it works on pipes).
15
15
It cannot be used on regular files to determine whether a file has grown since
@@ -41,10 +41,10 @@ The module defines the following:
41
41
polling object; see section :ref: `devpoll-objects ` below for the
42
42
methods supported by devpoll objects.
43
43
44
- :c:func: `devpoll ` objects are linked to the number of file
44
+ :c:func: `! devpoll ` objects are linked to the number of file
45
45
descriptors allowed at the time of instantiation. If your program
46
- reduces this value, :c:func: `devpoll ` will fail. If your program
47
- increases this value, :c:func: `devpoll ` may return an
46
+ reduces this value, :c:func: `! devpoll ` will fail. If your program
47
+ increases this value, :c:func: `! devpoll ` may return an
48
48
incomplete list of active file descriptors.
49
49
50
50
The new file descriptor is :ref: `non-inheritable <fd_inheritance >`.
@@ -62,7 +62,7 @@ The module defines the following:
62
62
63
63
*sizehint * informs epoll about the expected number of events to be
64
64
registered. It must be positive, or ``-1 `` to use the default. It is only
65
- used on older systems where :c:func: `epoll_create1 ` is not available;
65
+ used on older systems where :c:func: `! epoll_create1 ` is not available;
66
66
otherwise it has no effect (though its value is still checked).
67
67
68
68
*flags * is deprecated and completely ignored. However, when supplied, its
@@ -117,7 +117,7 @@ The module defines the following:
117
117
118
118
.. function :: select(rlist, wlist, xlist[, timeout])
119
119
120
- This is a straightforward interface to the Unix :c:func: `select ` system call.
120
+ This is a straightforward interface to the Unix :c:func: `! select ` system call.
121
121
The first three arguments are iterables of 'waitable objects': either
122
122
integers representing file descriptors or objects with a parameterless method
123
123
named :meth: `~io.IOBase.fileno ` returning such an integer:
@@ -154,7 +154,7 @@ The module defines the following:
154
154
.. index :: single: WinSock
155
155
156
156
File objects on Windows are not acceptable, but sockets are. On Windows,
157
- the underlying :c:func: `select ` function is provided by the WinSock
157
+ the underlying :c:func: `! select ` function is provided by the WinSock
158
158
library, and does not handle file descriptors that don't originate from
159
159
WinSock.
160
160
@@ -169,7 +169,7 @@ The module defines the following:
169
169
170
170
The minimum number of bytes which can be written without blocking to a pipe
171
171
when the pipe has been reported as ready for writing by :func: `~select.select `,
172
- :func: `poll ` or another interface in this module. This doesn't apply
172
+ :func: `! poll ` or another interface in this module. This doesn't apply
173
173
to other kind of file-like objects such as sockets.
174
174
175
175
This value is guaranteed by POSIX to be at least 512.
@@ -184,11 +184,11 @@ The module defines the following:
184
184
``/dev/poll `` Polling Objects
185
185
-----------------------------
186
186
187
- Solaris and derivatives have ``/dev/poll ``. While :c:func: `select ` is
188
- O(highest file descriptor) and :c:func: `poll ` is O(number of file
187
+ Solaris and derivatives have ``/dev/poll ``. While :c:func: `! select ` is
188
+ O(highest file descriptor) and :c:func: `! poll ` is O(number of file
189
189
descriptors), ``/dev/poll `` is O(active file descriptors).
190
190
191
- ``/dev/poll `` behaviour is very close to the standard :c:func: `poll `
191
+ ``/dev/poll `` behaviour is very close to the standard :c:func: `! poll `
192
192
object.
193
193
194
194
@@ -222,7 +222,7 @@ object.
222
222
implement :meth: `!fileno `, so they can also be used as the argument.
223
223
224
224
*eventmask * is an optional bitmask describing the type of events you want to
225
- check for. The constants are the same that with :c:func: `poll `
225
+ check for. The constants are the same that with :c:func: `! poll `
226
226
object. The default value is a combination of the constants :const: `POLLIN `,
227
227
:const: `POLLPRI `, and :const: `POLLOUT `.
228
228
@@ -231,7 +231,7 @@ object.
231
231
Registering a file descriptor that's already registered is not an
232
232
error, but the result is undefined. The appropriate action is to
233
233
unregister or modify it first. This is an important difference
234
- compared with :c:func: `poll `.
234
+ compared with :c:func: `! poll `.
235
235
236
236
237
237
.. method :: devpoll.modify(fd[, eventmask])
@@ -376,13 +376,13 @@ Edge and Level Trigger Polling (epoll) Objects
376
376
Polling Objects
377
377
---------------
378
378
379
- The :c:func: `poll ` system call, supported on most Unix systems, provides better
379
+ The :c:func: `! poll ` system call, supported on most Unix systems, provides better
380
380
scalability for network servers that service many, many clients at the same
381
- time. :c:func: `poll ` scales better because the system call only requires listing
382
- the file descriptors of interest, while :c:func: `select ` builds a bitmap, turns
381
+ time. :c:func: `! poll ` scales better because the system call only requires listing
382
+ the file descriptors of interest, while :c:func: `! select ` builds a bitmap, turns
383
383
on bits for the fds of interest, and then afterward the whole bitmap has to be
384
- linearly scanned again. :c:func: `select ` is O(highest file descriptor), while
385
- :c:func: `poll ` is O(number of file descriptors).
384
+ linearly scanned again. :c:func: `! select ` is O(highest file descriptor), while
385
+ :c:func: `! poll ` is O(number of file descriptors).
386
386
387
387
388
388
.. method :: poll.register(fd[, eventmask])
0 commit comments