diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2016-05-16 20:23:00 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2016-05-16 20:23:00 (GMT) |
commit | 950204df9cdc1fc632e073f646e47725f5cfe0c1 (patch) | |
tree | 99b89e5ad5bc7899546cb29ce308ddadbbc530f9 /Doc/library/asyncio-eventloop.rst | |
parent | 7661db622892c9731c502ccdd7af130cbfd23f5c (diff) | |
download | cpython-950204df9cdc1fc632e073f646e47725f5cfe0c1.zip cpython-950204df9cdc1fc632e073f646e47725f5cfe0c1.tar.gz cpython-950204df9cdc1fc632e073f646e47725f5cfe0c1.tar.bz2 |
docs: Update asyncio docs & whatsnew
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. |