Skip to content

[3.8] bpo-41247: asyncio.set_running_loop() cache running loop holder #21406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

tontinton
Copy link
Contributor

@tontinton tontinton commented Jul 8, 2020

The running loop holder cache variable was always set to NULL when
calling set_running_loop.

Now set_running_loop saves the newly created running loop holder in the
cache variable for faster access in get_running_loop.

https://bugs.python.org/issue41247

@tontinton tontinton requested review from 1st1 and asvetlov as code owners July 8, 2020 21:26
@tontinton tontinton changed the title bpo-41247: asyncio.set_running_loop() cache running loop holder [3.8] bpo-41247: asyncio.set_running_loop() cache running loop holder Jul 8, 2020
@tontinton tontinton force-pushed the fix-issue-41247-3.8 branch from d21ecdc to e2aac17 Compare July 8, 2020 21:27
@tontinton tontinton changed the title [3.8] bpo-41247: asyncio.set_running_loop() cache running loop holder [3.8] bpo-41247: asyncio.set_running_loop() cache running loop holder (GH-21401) Jul 8, 2020
The running loop holder cache variable was always set to NULL when
calling set_running_loop.

Now set_running_loop saves the newly created running loop holder in the
cache variable for faster access in get_running_loop.
@tontinton tontinton force-pushed the fix-issue-41247-3.8 branch from e2aac17 to 981d410 Compare July 8, 2020 21:49
@tontinton tontinton changed the title [3.8] bpo-41247: asyncio.set_running_loop() cache running loop holder (GH-21401) [3.8] bpo-41247: asyncio.set_running_loop() cache running loop holder Jul 8, 2020
@1st1
Copy link
Member

1st1 commented Jul 8, 2020

Hm, I liked the previous version of the patch better. Why did you change it?

@tontinton
Copy link
Contributor Author

tontinton commented Jul 9, 2020

Hm, I liked the previous version of the patch better. Why did you change it?

_PyThreadState_GetDict() and PyThreadState_GetID() don't exist in 3.8,
That's why the build failed when we tried to merge to 3.8

@1st1 1st1 merged commit 0b6169e into python:3.8 Jul 9, 2020
@bedevere-bot
Copy link

@1st1: Please replace # with GH- in the commit message next time. Thanks!

@1st1
Copy link
Member

1st1 commented Jul 9, 2020

_PyThreadState_GetDict() and PyThreadState_GetID() don't exist in 3.8,

Fair enough. Thanks for the PRs and I hope we'll see more contributions from you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants