8000 feat: more lock to gc&drop check · RustPython/RustPython@9e7ca37 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e7ca37

Browse files
committed
feat: more lock to gc&drop check
1 parent ce4a863 commit 9e7ca37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vm/src/object/gc/collector.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ impl Collector {
355355
let _lock = obj.header().exclusive();
356356
// prevent RAII Drop to drop below zero
357357
if obj.header().rc() > 0 {
358-
obj.header().do_pausing();
358+
let _lock = obj.header().try_pausing();
359+
debug_assert!(!obj.header().is_drop());
359360
let rc = obj.header().dec();
360361
if rc == 0 {
361362
self.release(obj)

0 commit comments

Comments
 (0)
0