Skip to content

Commit

Permalink
Use assert_ne for checking thread initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu authored and davidhewitt committed Dec 20, 2020
1 parent dc2dbd6 commit 839f13e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 839f13e

Please sign in to comment.