mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Applying updated patch from Issue 1736190, which addresses partial
issues in: 909005 and 17361001, as well as completely as possible issues 539444, 760475, 777588, 889153, 953599, 1025525, 1063924, and 658749. This patch also includes doc and test updates as necessary.
This commit is contained in:
parent
602d8db2bc
commit
1a72d88abf
5 changed files with 213 additions and 103 deletions
|
@ -222,6 +222,20 @@ any that have been added to the map during asynchronous service) is closed.
|
|||
flushed). Sockets are automatically closed when they are
|
||||
garbage-collected.
|
||||
|
||||
.. class:: file_dispatcher()
|
||||
A file_dispatcher takes a file descriptor or file object along with an
|
||||
optional map argument and wraps it for use with the :cfunc:`poll`\ or
|
||||
:cfunc:`loop`\ functions. If provided a file object or anything with a
|
||||
:cfunc:`fileno`\ method, that method will be called and passed to the
|
||||
:class:`file_wrapper` constructor.
|
||||
Availability: UNIX
|
||||
|
||||
.. class::file_wrapper()
|
||||
A file_wrapper takes an integer file descriptor and calls os.dup() to
|
||||
duplicate the handle so that the original handle may be closed independently
|
||||
of the file_wrapper. This class implements sufficient methods to emulate a
|
||||
socket for use by the file_dispatcher class.
|
||||
Availability: UNIX
|
||||
|
||||
.. _asyncore-example:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue