Skip to content

GH-118095: Allow a variant of RESUME_CHECK in tier 2 #118286

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 4 commits into from
Apr 29, 2024

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Apr 25, 2024

Currently executors cannot start with RESUME or RESUME_CHECK.

This PR adds two special tier 2 uops that allow the eval_breaker to be check efficiently and to guarantee progress if the executor would start with RESUME or RESUME_CHECK.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive!

@markshannon
Copy link
Member Author

markshannon commented Apr 26, 2024

Unfortunately it seems that my assumption that _Py_HandlePending clears the flags is false, so this doesn't work.
I think the general idea of moving the expensive operation off out line is sound, but the details need working out.

It appears that _Py_HandlePending may leave the eval breaker set to non-zero, but that it will eventually clear it if called repeatedly.

@markshannon markshannon merged commit ab6eda0 into python:main Apr 29, 2024
51 of 52 checks passed
@markshannon markshannon deleted the tier-2-safe-resume branch August 6, 2024 10:19
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.

2 participants