Skip to content

Commit

Permalink
disable assert that may not be true on free-threaded build
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Sep 23, 2024
1 parent 8c14ce9 commit 924e275
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ fn gc_integration() {
Python::with_gil(|py| {
py.run(ffi::c_str!("import gc; gc.collect()"), None, None)
.unwrap();
// threads are resumed before tp_clear() calls finish, so drop might not
// necessarily be called when we get here see
// https://peps.python.org/pep-0703/#stop-the-world
#[cfg(not(Py_GIL_DISABLED))]
assert!(drop_called.load(Ordering::Relaxed));
});
}
Expand Down

0 comments on commit 924e275

Please sign in to comment.