pep 567: Mention Future.add_done_callback() (#502)
This commit is contained in:
parent
b0528e63c6
commit
08ace1389d
|
@ -207,9 +207,9 @@ and ``Loop.call_at()`` to schedule the asynchronous execution of a
|
||||||
function. ``asyncio.Task`` uses ``call_soon()`` to run the
|
function. ``asyncio.Task`` uses ``call_soon()`` to run the
|
||||||
wrapped coroutine.
|
wrapped coroutine.
|
||||||
|
|
||||||
We modify ``Loop.call_{at,later,soon}`` to accept the new
|
We modify ``Loop.call_{at,later,soon}`` and
|
||||||
optional *context* keyword-only argument, which defaults to
|
``Future.add_done_callback()`` to accept the new optional *context*
|
||||||
the current context::
|
keyword-only argument, which defaults to the current context::
|
||||||
|
|
||||||
def call_soon(self, callback, *args, context=None):
|
def call_soon(self, callback, *args, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
|
|
Loading…
Reference in New Issue