Issue #25593: Change semantics of EventLoop.stop(). (Merge 3.4->3.5)
authorGuido van Rossum <guido@python.org>
Thu, 19 Nov 2015 21:33:34 +0000 (13:33 -0800)
committerGuido van Rossum <guido@python.org>
Thu, 19 Nov 2015 21:33:34 +0000 (13:33 -0800)
1  2 
Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-protocol.rst
Misc/NEWS

index 279bc29636326efca73982acb398e56e383b0fa8,96468ae56705b7fa5131bf27735ec04acf9913da..dbe351d5f7d41f65354435ce0e5460abb08aa03c
@@@ -29,7 -29,16 +29,16 @@@ Run an event loo
  
  .. method:: BaseEventLoop.run_forever()
  
-    Run until :meth:`stop` is called.
+    Run until :meth:`stop` is called.  If :meth:`stop` is called before
+    :meth:`run_forever()` is called, this polls the I/O selector once
+    with a timeout of zero, runs all callbacks scheduled in response to
+    I/O events (and those that were already scheduled), and then exits.
+    If :meth:`stop` is called while :meth:`run_forever` is running,
+    this will run the current batch of callbacks and then exit.  Note
+    that callbacks scheduled by callbacks will not run in that case;
+    they will run the next time :meth:`run_forever` is called.
 -   .. versionchanged:: 3.4.4
++   .. versionchanged:: 3.5.1
  
  .. method:: BaseEventLoop.run_until_complete(future)
  
  
     Stop running the event loop.
  
-    Every callback scheduled before :meth:`stop` is called will run.
-    Callbacks scheduled after :meth:`stop` is called will not run.
-    However, those callbacks will run if :meth:`run_forever` is called
-    again later.
+    This causes :meth:`run_forever` to exit at the next suitable
+    opportunity (see there for more details).
 -   .. versionchanged:: 3.4.4
++   .. versionchanged:: 3.5.1
  
  .. method:: BaseEventLoop.is_closed()
  
Simple merge
diff --cc Misc/NEWS
Simple merge