[Python-checkins] cpython: Clarify that flow control works for datagrams, except on BSD.
guido.van.rossum
python-checkins at python.org
Mon Feb 24 23:31:34 CET 2014
http://hg.python.org/cpython/rev/2072deff3b2f
changeset: 89384:2072deff3b2f
user: Guido van Rossum <guido at python.org>
date: Mon Feb 24 14:31:25 2014 -0800
summary:
Clarify that flow control works for datagrams, except on BSD.
files:
Doc/library/asyncio-protocol.rst | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst
--- a/Doc/library/asyncio-protocol.rst
+++ b/Doc/library/asyncio-protocol.rst
@@ -376,8 +376,8 @@
Flow control callbacks
----------------------
-These callbacks may be called on :class:`Protocol` and
-:class:`SubprocessProtocol` instances:
+These callbacks may be called on :class:`Protocol`,
+:class:`DatagramProtocol` and :class:`SubprocessProtocol` instances:
.. method:: BaseProtocol.pause_writing()
@@ -402,6 +402,15 @@
are important to ensure that things go as expected when either
mark is zero.
+.. note::
+ On BSD systems (OS X, FreeBSD, etc.) flow control is not supported
+ for :class:`DatagramProtocol`, because send failures caused by
+ writing too many packets cannot be detected easily. The socket
+ always appears 'ready' and excess packets are dropped; an
+ :class:`OSError` with errno set to :const:`errno.ENOBUFS` may or
+ may not be raised; if it is raised, it will be reported to
+ :meth:`DatagramProtocol.error_received` but otherwise ignored.
+
Coroutines and protocols
------------------------
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list