Clarify exactly how vague the spec for stop() really is.

This commit is contained in:
Guido van Rossum 2013-03-24 17:48:02 -07:00
parent 06c6f63510
commit 4362292e74
1 changed files with 7 additions and 2 deletions

View File

@ -221,8 +221,13 @@ A conforming event loop object has the following methods:
- ``stop()``. Stops the event loop as soon as it is convenient. It
is fine to restart the loop with ``run()`` or ``run_until_complete()``
subsequently; no scheduled callbacks will be lost if this happens.
Note: How soon the event loop stops is up to the implementation.
Note: ``stop()`` returns normally and the current callback is
allowed to continue. How soon after this point the event loop stops
is up to the implementation, but the intention is to stop short of
polling for I/O, and not to run any callbacks scheduled in the
future; the major freedom an implementation has is how much of the
"ready queue" (callbacks already scheduled with ``call_soon()``) it
processes before stopping.
- ``close()``. Closes the event loop, releasing any resources it may
hold, such as the file descriptor used by ``epoll()`` or