Rename run() -> run_forever(), and explain why.

This commit is contained in:
Guido van Rossum 2013-04-24 16:59:39 -07:00
parent f1d4e5f985
commit 79817b9890
1 changed files with 7 additions and 2 deletions

View File

@ -207,8 +207,13 @@ call is a no-op.
A conforming event loop object has the following methods:
- ``run()``. Runs the event loop until ``stop()`` is called. This
cannot be called when the event loop is already running.
- ``run_forever()``. Runs the event loop until ``stop()`` is called.
This cannot be called when the event loop is already running. (This
has a long name in part to avoid confusion with earlier versions of
this PEP, where ``run()`` had different behavior, in part because
there are already too many APIs that have a method named ``run()``,
and in part because there shouldn't be many places where this is
called anyway.
- ``run_until_complete(future, timeout=None)``. Runs the event loop
until the Future is done. If a timeout is given, it waits at most