Skip to content

Commit

Permalink
acquire lock. Helps with #5111
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Aug 25, 2023
1 parent 6dc5a84 commit ecd3d04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/rlm_python3/rlm_python3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,8 @@ static int python_interpreter_init(rlm_python_t *inst, CONF_SECTION *conf)
Py_InitializeEx(0); /* Don't override signal handlers - noop on subs calls */
PyEval_InitThreads(); /* This also grabs a lock (which we then need to release) */
main_interpreter = PyThreadState_Get(); /* Store reference to the main interpreter */
} else {
PyEval_AcquireLock();
}
rad_assert(PyEval_ThreadsInitialized());

Expand Down

0 comments on commit ecd3d04

Please sign in to comment.