From 839f13ea21cf2fabe9c7944c096cac0a4820e96e Mon Sep 17 00:00:00 2001 From: kngwyu Date: Sun, 20 Dec 2020 15:52:10 +0900 Subject: [PATCH] Use assert_ne for checking thread initialization --- src/gil.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gil.rs b/src/gil.rs index c66bbaf0..135881b3 100644 --- a/src/gil.rs +++ b/src/gil.rs @@ -64,7 +64,7 @@ pub fn prepare_freethreaded_python() { if ffi::Py_IsInitialized() != 0 { // If Python is already initialized, we expect Python threading to also be initialized, // as we can't make the existing Python main thread acquire the GIL. - debug_assert_ne!(ffi::PyEval_ThreadsInitialized(), 0); + assert_ne!(ffi::PyEval_ThreadsInitialized(), 0); } else { // Initialize Python. // We use Py_InitializeEx() with initsigs=0 to disable Python signal handling.