MCPcopy Index your code
hub / github.com/RustPython/RustPython / flush_deferred_drops

Function flush_deferred_drops

crates/common/src/refcount.rs:267–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

265#[cfg(feature = "std")]
266#[inline]
267pub fn flush_deferred_drops() {
268 DEFERRED_QUEUE.with(|q| {
269 // Take all queued operations
270 let ops: Vec<_> = q.borrow_mut().drain(..).collect();
271 // Execute them outside the borrow
272 for op in ops {
273 op();
274 }
275 });
276}

Callers 1

dropMethod · 0.85

Calls 4

withMethod · 0.80
collectMethod · 0.80
borrow_mutMethod · 0.80
drainMethod · 0.45

Tested by

no test coverage detected