AssertionError (3.X only) when calling Py_Finalize with threads

后端 未结 1 982
悲哀的现实
悲哀的现实 2021-01-21 07:05

I\'m getting an error output when I call the C-API\'s Py_Finalize() from a different C-thread than I made a python call on.

The error I\'m seeing is:

Exc         


        
1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-21 07:22

    Try by adding

    Py_DECREF(PyImport_ImportModule("threading"));
    

    after

    PyEval_InitThreads();
    

    0 讨论(0)
提交回复
热议问题