Skip to content

Commit 21d360d

Browse files
committed
Oops: forgot to make sure to acquire GIL first!
1 parent a86b6b4 commit 21d360d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

softIocApp/PythonSupport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const char *get_EPICS_BASE(void)
3030
* and pass them back to the Python layer. */
3131
PyObject *get_DBF_values(void)
3232
{
33+
PyGILState_STATE gstate = PyGILState_Ensure();
3334
PyObject *dict = PyDict_New();
3435
ADD_ENUM(dict, DBF_STRING);
3536
ADD_ENUM(dict, DBF_CHAR);
@@ -47,6 +48,7 @@ PyObject *get_DBF_values(void)
4748
ADD_ENUM(dict, DBF_OUTLINK);
4849
ADD_ENUM(dict, DBF_FWDLINK);
4950
ADD_ENUM(dict, DBF_NOACCESS);
51+
PyGILState_Release(gstate);
5052
return dict;
5153
}
5254

0 commit comments

Comments
 (0)