Skip to content

Commit 9499c74

Browse files
committed
gh-151950: Document async.BaseEventLoop and fix asyncio-extending.rst
1 parent ad38cf8 commit 9499c74

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

Doc/library/asyncio-eventloop.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,16 @@ By default asyncio is configured to use :class:`EventLoop`.
19171917
methods that an alternative implementation of ``AbstractEventLoop``
19181918
should have defined.
19191919

1920+
.. class:: BaseEventLoop
1921+
1922+
Abstract base class for asyncio-compliant event loops.
1923+
Inherits from :class:`AbstractEventLoop` directly.
1924+
1925+
Has many methods of ``AbstractEventLoop`` implemented, so end users
1926+
would have less methods to implement themselfs.
1927+
But, instead forces to implement some internal protected API methods.
1928+
See :ref:`writting_custom_event_loop` for more information.
1929+
19201930

19211931
Examples
19221932
========

Doc/library/asyncio-extending.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ classes. Asyncio has helpers that could be used to simplify this task.
1515
in *internal* part of API.
1616

1717

18+
.. _writting_custom_event_loop:
19+
1820
Writing a Custom Event Loop
1921
===========================
2022

21-
:class:`asyncio.AbstractEventLoop` declares very many methods. Implementing all them
22-
from scratch is a tedious job.
23+
:class:`asyncio.AbstractEventLoop` declares very many methods.
24+
See :ref:`asyncio-event-loop-methods` for the full list.
25+
Implementing all them from scratch is a tedious job.
2326

2427
A loop can get many common methods implementation for free by inheriting from
2528
:class:`asyncio.BaseEventLoop`.

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Doc/c-api/init_config.rst
66
Doc/c-api/intro.rst
77
Doc/c-api/stable.rst
88
Doc/library/ast.rst
9-
Doc/library/asyncio-extending.rst
109
Doc/library/email.charset.rst
1110
Doc/library/email.parser.rst
1211
Doc/library/http.cookiejar.rst

0 commit comments

Comments
 (0)