Skip to content

Commit

Permalink
Add comment explaining the call to PyGILState_Check
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv committed Aug 15, 2023
1 parent 7394f23 commit 0f7500c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions morpheus/_lib/src/objects/python_data_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ PyDataTable::~PyDataTable()
{
if (m_py_table)
{
// Check to see if we need to grab the GIL. If we are being destroyed by the Python GC we actually don't need
// to and don't want to aquire the GIL using pybind11 because it will trigger a pybind11 internal error.
if (PyGILState_Check() == 0)
{
pybind11::gil_scoped_acquire gil;
Expand Down

0 comments on commit 0f7500c

Please sign in to comment.