From 7b397220a5be543aeac712935b6826a6aca0da6d Mon Sep 17 00:00:00 2001 From: David Gardner Date: Tue, 5 Sep 2023 15:34:01 -0700 Subject: [PATCH] Improvements per PR feedback --- python/mrc/tests/utils.cpp | 5 +---- python/tests/test_gil_tls.py | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/python/mrc/tests/utils.cpp b/python/mrc/tests/utils.cpp index 14617cd17..d700df879 100644 --- a/python/mrc/tests/utils.cpp +++ b/python/mrc/tests/utils.cpp @@ -24,7 +24,6 @@ #include // for gil_scoped_acquire #include -#include // std::array needed for py::print #include #include @@ -37,10 +36,8 @@ struct RequireGilInDestructor { ~RequireGilInDestructor() { - // Grab the GIL to print + // Grab the GIL py::gil_scoped_acquire gil; - - py::print("RequireGilInDestructor::~RequireGilInDestructor() - calling destructor"); } }; diff --git a/python/tests/test_gil_tls.py b/python/tests/test_gil_tls.py index eb0a63c3e..eca5a23d7 100644 --- a/python/tests/test_gil_tls.py +++ b/python/tests/test_gil_tls.py @@ -21,15 +21,13 @@ TLS = threading.local() -def test_gc_called_in_thread_finalizer(): +def test_gil_thread_local_storage(): """ Test to reproduce issue #362 No asserts needed if it doesn't segfault, then we're good """ - mrc.logging.log("Building pipeline") def source_gen(): - mrc.logging.log("source_gen") x = RequireGilInDestructor() TLS.x = x yield x