Skip to content

Commit

Permalink
Merge pull request #2428 from lf-lang/python-graceful-failure
Browse files Browse the repository at this point in the history
Do not segfault when Python reactions fail.
  • Loading branch information
edwardalee authored Oct 17, 2024
2 parents 4d24766 + 97e7c7e commit ce42657
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ private static String generateCPythonFunctionCaller(
+ " code again",
" }",
" " + PyUtil.generateGILReleaseCode(),
" Py_FinalizeEx();",
" exit(1);",
" exit(1);", // NOTE: Used to call Py_FinalizeEx() before exit, but it segfaults.
"}",
"",
"/* Release the thread. No Python API allowed beyond this point. */",
Expand Down

0 comments on commit ce42657

Please sign in to comment.