From 89063703d5c01d35f20f0dd1f14f6724c746cbb4 Mon Sep 17 00:00:00 2001 From: David Gardner Date: Wed, 16 Aug 2023 10:01:32 -0700 Subject: [PATCH] Debug logging --- python/mrc/_pymrc/src/executor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/mrc/_pymrc/src/executor.cpp b/python/mrc/_pymrc/src/executor.cpp index a62e2c1e7..0d14aad53 100644 --- a/python/mrc/_pymrc/src/executor.cpp +++ b/python/mrc/_pymrc/src/executor.cpp @@ -114,20 +114,22 @@ std::function create_gil_initializer() std::function create_gil_finalizer() { bool python_finalizing = _Py_IsFinalizing() != 0; + LOG(INFO) << "create_gil_finalizer - finalizing: " << std::boolalpha << python_finalizing; if (python_finalizing) { - // If python if finalizing, dont worry about thread state + // If python is finalizing, dont worry about thread state return nullptr; } // Ensure we dont have the GIL here otherwise this deadlocks. return [] { bool python_finalizing = _Py_IsFinalizing() != 0; + LOG(INFO) << "gil_finalizer - finalizing: " << std::boolalpha << python_finalizing; if (python_finalizing) { - // If python if finalizing, dont worry about thread state + // If python is finalizing, dont worry about thread state return; }