Skip to content

[3.12] gh-76785: Use Pending Calls When Releasing Cross-Interpreter Data (gh-109556) - #109586

Closed
miss-islington wants to merge 4 commits into
python:3.12from
miss-islington:backport-fd7e08a-3.12
Closed

[3.12] gh-76785: Use Pending Calls When Releasing Cross-Interpreter Data (gh-109556)#109586
miss-islington wants to merge 4 commits into
python:3.12from
miss-islington:backport-fd7e08a-3.12

Conversation

@miss-islington

@miss-islingtonmiss-islington commented Sep 19, 2023

Copy link
Copy Markdown
Contributor

This fixes some crashes in the _xxinterpchannels module, due to a race between interpreters.
(cherry picked from commit fd7e08a)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com

…ta (pythongh-109556)
This fixes some crashes in the _xxinterpchannels module, due to a race between interpreters.
(cherry picked from commit fd7e08a)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
@ericsnowcurrently

Copy link
Copy Markdown
Member

Backporting this to 3.12 will have to be done in a way that does not introduce the new _PyCrossInterpreterData_ReleaseAndRawFree() into the public ABI.

@ericsnowcurrently
ericsnowcurrently marked this pull request as ready for review October 11, 2023 13:59
#include "pycore_gil.h" // struct _gil_runtime_state


typedef int (*_Py_pending_call_func)(void *);

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.

I don't think this refactoring should be done in 3.12.1. Is there a reason not to leave it just 'int (*func)(void *)' in a few places?

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.

Yeah, _Py_pending_call_func() is not necessary. I'm fine with dropping it.

@ericsnowcurrently

Copy link
Copy Markdown
Member

I didn't figure out how to modify the miss-islington branch so I've created a new PR: gh-112288.

@ericsnowcurrently

Copy link
Copy Markdown
Member

I've merged this change through gh-112288.

@miss-islington
miss-islington deleted the backport-fd7e08a-3.12 branch January 2, 2026 19:01
Sign up for freeto 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.

3 participants

@miss-islington@ericsnowcurrently@Yhg1s