-
-
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
gh-127041: Prevent new threads after an interpreter has started finalizing #127044
base: main
Are you sure you want to change the base?
Conversation
I'm not too sure how I broke the threading tests with this. |
As it turns out, the threading aborts are a result of a separate bug, I just managed to trigger it by raising in import _interpreters
interp = _interpreters.create()
source = """
import threading
def task():
time.sleep(100)
t = threading.Thread(target=task)
t.start()
"""
_interpreters.run_string(interp, source) This causes an assertion failure on my end:
I'm pretty sure that the problem is that even though the interpreter doesn't have a |
cc @ericsnowcurrently
I decided to use a sentinel pointer instead of a new field like I originally did, which I think is a little better. I've left a few open issues as
XXX
comments :)_interpreters.destroy
#127041