Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
markshannon merged 4 commits into
python:mainpython/cpython:mainfrom
faster-cpython:tier-2-safe-resumefaster-cpython/cpython:tier-2-safe-resumeCopy head branch name to clipboard
Apr 29, 2024
Merged

GH-118095: Allow a variant of RESUME_CHECK in tier 2#118286
markshannon merged 4 commits into
python:mainpython/cpython:mainfrom
faster-cpython:tier-2-safe-resumefaster-cpython/cpython:tier-2-safe-resumeCopy head branch name to clipboard

Conversation

@markshannon

@markshannon markshannon commented Apr 25, 2024

Copy link
Copy Markdown
Member

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.

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Impressive!

@markshannon

markshannon commented Apr 26, 2024

Copy link
Copy Markdown
Member Author

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.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.