Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(128584)

Side by Side Diff: Doc/library/select.rst

Issue 18794: select.devpoll objects have no close() method
Patch Set: Created 6 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Lib/test/test_devpoll.py » ('j') | Lib/test/test_devpoll.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`select` --- Waiting for I/O completion 1 :mod:`select` --- Waiting for I/O completion
2 ============================================ 2 ============================================
3 3
4 .. module:: select 4 .. module:: select
5 :synopsis: Wait for I/O completion on multiple streams. 5 :synopsis: Wait for I/O completion on multiple streams.
6 6
7 7
8 This module provides access to the :c:func:`select` and :c:func:`poll` functions 8 This module provides access to the :c:func:`select` and :c:func:`poll` functions
9 available in most operating systems, :c:func:`devpoll` available on 9 available in most operating systems, :c:func:`devpoll` available on
10 Solaris and derivatives, :c:func:`epoll` available on Linux 2.5+ and 10 Solaris and derivatives, :c:func:`epoll` available on Linux 2.5+ and
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 http://developers.sun.com/solaris/articles/using_devpoll.html 139 http://developers.sun.com/solaris/articles/using_devpoll.html
140 http://developers.sun.com/solaris/articles/polling_efficient.html 140 http://developers.sun.com/solaris/articles/polling_efficient.html
141 141
142 Solaris and derivatives have ``/dev/poll``. While :c:func:`select` is 142 Solaris and derivatives have ``/dev/poll``. While :c:func:`select` is
143 O(highest file descriptor) and :c:func:`poll` is O(number of file 143 O(highest file descriptor) and :c:func:`poll` is O(number of file
144 descriptors), ``/dev/poll`` is O(active file descriptors). 144 descriptors), ``/dev/poll`` is O(active file descriptors).
145 145
146 ``/dev/poll`` behaviour is very close to the standard :c:func:`poll` 146 ``/dev/poll`` behaviour is very close to the standard :c:func:`poll`
147 object. 147 object.
148
149
150 .. method:: devpoll.close()
151
152 Close the file descriptor of the polling object.
153
154 .. versionadded:: 3.4
155
156
157 .. attribute:: devpoll.closed
158
159 ``True`` if the polling object is closed.
160
161 .. versionadded:: 3.4
162
163
164 .. method:: devpoll.fileno()
165
166 Return the file descriptor number of the polling object.
167
168 .. versionadded:: 3.4
148 169
149 170
150 .. method:: devpoll.register(fd[, eventmask]) 171 .. method:: devpoll.register(fd[, eventmask])
151 172
152 Register a file descriptor with the polling object. Future calls to the 173 Register a file descriptor with the polling object. Future calls to the
153 :meth:`poll` method will then check whether the file descriptor has any pendi ng 174 :meth:`poll` method will then check whether the file descriptor has any pendi ng
154 I/O events. *fd* can be either an integer, or an object with a :meth:`fileno ` 175 I/O events. *fd* can be either an integer, or an object with a :meth:`fileno `
155 method that returns an integer. File objects implement :meth:`fileno`, so th ey 176 method that returns an integer. File objects implement :meth:`fileno`, so th ey
156 can also be used as the argument. 177 can also be used as the argument.
157 178
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 +-----------------------+-----------------------------------------------+ 256 +-----------------------+-----------------------------------------------+
236 | :const:`EPOLLWRBAND` | Priority data may be written. | 257 | :const:`EPOLLWRBAND` | Priority data may be written. |
237 +-----------------------+-----------------------------------------------+ 258 +-----------------------+-----------------------------------------------+
238 | :const:`EPOLLMSG` | Ignored. | 259 | :const:`EPOLLMSG` | Ignored. |
239 +-----------------------+-----------------------------------------------+ 260 +-----------------------+-----------------------------------------------+
240 261
241 262
242 .. method:: epoll.close() 263 .. method:: epoll.close()
243 264
244 Close the control file descriptor of the epoll object. 265 Close the control file descriptor of the epoll object.
266
267
268 .. attribute:: epoll.closed
269
270 ``True`` if the epoll object is closed.
245 271
246 272
247 .. method:: epoll.fileno() 273 .. method:: epoll.fileno()
248 274
249 Return the file descriptor number of the control fd. 275 Return the file descriptor number of the control fd.
250 276
251 277
252 .. method:: epoll.fromfd(fd) 278 .. method:: epoll.fromfd(fd)
253 279
254 Create an epoll object from a given file descriptor. 280 Create an epoll object from a given file descriptor.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 380
355 381
356 .. _kqueue-objects: 382 .. _kqueue-objects:
357 383
358 Kqueue Objects 384 Kqueue Objects
359 -------------- 385 --------------
360 386
361 .. method:: kqueue.close() 387 .. method:: kqueue.close()
362 388
363 Close the control file descriptor of the kqueue object. 389 Close the control file descriptor of the kqueue object.
390
391
392 .. attribute:: kqueue.closed
393
394 ``True`` if the kqueue object is closed.
364 395
365 396
366 .. method:: kqueue.fileno() 397 .. method:: kqueue.fileno()
367 398
368 Return the file descriptor number of the control fd. 399 Return the file descriptor number of the control fd.
369 400
370 401
371 .. method:: kqueue.fromfd(fd) 402 .. method:: kqueue.fromfd(fd)
372 403
373 Create a kqueue object from a given file descriptor. 404 Create a kqueue object from a given file descriptor.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 554
524 555
525 .. attribute:: kevent.data 556 .. attribute:: kevent.data
526 557
527 Filter specific data. 558 Filter specific data.
528 559
529 560
530 .. attribute:: kevent.udata 561 .. attribute:: kevent.udata
531 562
532 User defined value. 563 User defined value.
OLDNEW
« no previous file with comments | « no previous file | Lib/test/test_devpoll.py » ('j') | Lib/test/test_devpoll.py » ('J')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+