diff options
Diffstat (limited to 'Doc/library/asyncio-eventloop.rst')
-rw-r--r-- | Doc/library/asyncio-eventloop.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index f68b19d..1e97142 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -179,6 +179,20 @@ a different clock than :func:`time.time`. The :func:`asyncio.sleep` function. +Futures +------- + +.. method:: BaseEventLoop.create_future() + + Create an :class:`asyncio.Future` object attached to the loop. + + This is a preferred way to create futures in asyncio, as event + loop implementations can provide alternative implementations + of the Future class (with better performance or instrumentation). + + .. versionadded:: 3.5.2 + + Tasks ----- @@ -669,6 +683,13 @@ Allows customizing how exceptions are handled in the event loop. will be a ``dict`` object (see :meth:`call_exception_handler` documentation for details about context). +.. method:: BaseEventLoop.get_exception_handler() + + Return the exception handler, or ``None`` if the default one + is in use. + + .. versionadded:: 3.5.2 + .. method:: BaseEventLoop.default_exception_handler(context) Default exception handler. |