-
Notifications
You must be signed in to change notification settings - Fork 75
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
PyCall on thread != main: process will not exit #186
Comments
snickell
changed the title
If you use PyCall on a thread != main: process will not exit
If you use PyCall on a single thread, but not the main thread: process will not exit
Aug 8, 2024
snickell
changed the title
If you use PyCall on a single thread, but not the main thread: process will not exit
If you use PyCall on one thread, but thread != main: process will not exit
Aug 8, 2024
snickell
changed the title
If you use PyCall on one thread, but thread != main: process will not exit
PyCall on thread != main: process will not exit
Aug 8, 2024
Closed
I noticed we do not call Py_FinalizeEx(). If I call Changes in my repro code:
With these changes, now the main process exits. |
I have started a fix for this here: #187, but its not complete yet. It permits the process to exit, but sometimes it segfaults at exit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use PyCall from only one thread , but that thread is NOT the main thread, the process will not exit when the main thread exits.
This is not the same issue as: "Is PyCall Thread Safe" #96, as we are only using PyCall from one thread:
Example:
Output when
do_pycall_import: true
Output when
do_pycall_import: false
The text was updated successfully, but these errors were encountered: