From 30673d5fc41eaad4c24cf202a7bb3ffbd3c8a876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Tue, 25 Feb 2025 14:43:10 +0900 Subject: [PATCH] Up --- c_src/pythonx/pythonx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/c_src/pythonx/pythonx.cpp b/c_src/pythonx/pythonx.cpp index a1477c1..f3d404e 100644 --- a/c_src/pythonx/pythonx.cpp +++ b/c_src/pythonx/pythonx.cpp @@ -104,7 +104,8 @@ class PyGILGuard { ~PyGILGuard() { std::cout << "before PyEval_SaveThread " << this->thread_id << std::endl; - PyEval_SaveThread(); + auto t = PyEval_SaveThread(); + std:: cout << "same state " << (t == thread_states[this->thread_id]) << std::endl; std::cout << "after PyEval_SaveThread " << this->thread_id << std::endl; } };