-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Remove PyEval_ReInitThreads() from the public C API #80909
Comments
PyEval_ReInitThreads() is used internally by PyOS_AfterFork_Child(). I don't see the point of calling it directly. If you care of threads after fork, just call PyOS_AfterFork_Child(), no? I propose to remove PyEval_ReInitThreads() from the public C API. Problem: it's documented as a public function in High-level API of the Python Initialization API: On the Internet, I found a single project calling directly this function, but it's only in a test used to the test Python threading API: func TestThreadInitialization(t *testing.T) { assert.True(t, PyEval_ThreadsInitialized())
PyEval_ReInitThreads()
} I don't think that the PyEval_ReInitThreads() call here makes any sense. |
The function was added 19 years ago: commit fee3a2d
|
fwiw - i agree that this can be removed. it has no reason to ever be called directly. i double checked in our massive internal codebase at work and found no calls other than python interpreters themselves. |
Thanks. It confirms what I understood using GitHub code search (see my initial message). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: