This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: asyncio: document event loops
Type: Stage:
Components: asyncio, Documentation Versions: Python 3.4, Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, gvanrossum, python-dev, vstinner, yselivanov
Priority: normal Keywords:

Created on 2014-06-06 12:41 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg219878 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-06-06 12:41
Currently, the different implementations of asyncio event loop are not listed in the documentation. But they are mentionned in some places, like in the subprocess section to mention that Proactor doesn't support subprocess or that they are issues with Kqueue on old Mac OS X versions.

It would be useful to mention at least the name of each event loop.

Each event loop has specific features or different limitations. See for example the issue #21437 which asks to mention that the proactor event loop doesn't support SSL.
msg221004 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-06-19 16:18
On Windows, the default event loop is _WindowsSelectorEventLoop which calls On Windows, select() only accepts socket handles:

Only file descriptors of sockets are accepted for add_reader() and add_writer()? This event loop doesn't support subprocesses. 

On Windows, the proactor event loop can be used instead to support subprocesses. But this event loop doesn't support add_reader() nor add_writer() :-( This event loop doesn't support SSL.

On Windows, the granularity of the monotonic time is usually 15.6 msec. I don't know if it's interesting to mention it. The resolution is different if HPET is enabled on Windows.

On Mac OS X older than 10.9 (Mavericks), selectors.KqueueSelector is the default selector but it doesn't character devices like PTY. The SelectorEventLoop can be used with SelectSelector or PollSelector to handle character devices on Mac OS X 10.6 (Snow Leopard) and later.
msg222470 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-07-07 16:00
Oh, it looks like the proactor event loop doesn't support datagram protocol.
msg222584 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-07-08 21:43
New changeset 3f1381e3a68f by Victor Stinner in branch '3.4':
Issue #21680: Document asyncio event loops

New changeset 2c9d5f32f6c5 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #21680: Document asyncio event loops
Date User Action Args
2022-04-11 14:58:04adminsetgithub: 65879
2014-07-08 21:43:54vstinnersetstatus: open -> closed
resolution: fixed
2014-07-08 21:43:20python-devsetnosy: + python-dev
messages: + msg222584
2014-07-07 16:00:43vstinnersetmessages: + msg222470
2014-06-19 16:18:47vstinnersetmessages: + msg221004
2014-06-06 12:41:35vstinnercreate