Skip to content

Commit ad71326

Browse files
committed
Up
1 parent 30673d5 commit ad71326

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

c_src/pythonx/pythonx.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ class PyGILGuard {
103103
}
104104

105105
~PyGILGuard() {
106+
auto guard = std::lock_guard<std::mutex>(thread_states_mutex);
106107
std::cout << "before PyEval_SaveThread " << this->thread_id << std::endl;
107108
auto t = PyEval_SaveThread();
108-
std:: cout << "same state " << (t == thread_states[this->thread_id]) << std::endl;
109+
std:: cout << "state " << t << " " << thread_states[this->thread_id] << std::endl;
109110
std::cout << "after PyEval_SaveThread " << this->thread_id << std::endl;
110111
}
111112
};

0 commit comments

Comments
 (0)