Rename run() -> run_forever(), and explain why.
This commit is contained in:
parent
f1d4e5f985
commit
79817b9890
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue