]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32296: Implement asyncio.get_event_loop and _get_running_loop in C. (#4827)
authorYury Selivanov <yury@magic.io>
Wed, 13 Dec 2017 19:49:42 +0000 (14:49 -0500)
committerGitHub <noreply@github.com>
Wed, 13 Dec 2017 19:49:42 +0000 (14:49 -0500)
commita70232f28882d2fecb3ebe06643867701016070f
treee037779085e42db44777bc841648ea37391faeab
parentd5dda98fa80405db82e2eb36ac48671b4c8c0983
bpo-32296: Implement asyncio.get_event_loop and _get_running_loop in C. (#4827)

asyncio.get_event_loop(), and, subsequently asyncio._get_running_loop()
are one of the most frequently executed functions in asyncio.  They also
can't be sped up by third-party event loops like uvloop.

When implemented in C they become 4x faster.
Lib/asyncio/events.py
Lib/test/test_asyncio/test_events.py
Misc/NEWS.d/next/Library/2017-12-12-18-01-01.bpo-32296.bwscHz.rst [new file with mode: 0644]
Modules/_asynciomodule.c
Modules/clinic/_asynciomodule.c.h