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

Method maybe_close

crates/vm/src/coroutine.rs:76–88  ·  view source on GitHub ↗
(&self, res: &PyResult<ExecutionResult>)

Source from the content-addressed store, hash-verified

74 }
75
76 fn maybe_close(&self, res: &PyResult<ExecutionResult>) {
77 match res {
78 Ok(ExecutionResult::Return(_)) | Err(_) => {
79 self.closed.store(true);
80 // Frame is no longer suspended; allow frame.clear() to succeed.
81 self.frame.owner.store(
82 FrameOwner::FrameObject as i8,
83 core::sync::atomic::Ordering::Release,
84 );
85 }
86 Ok(ExecutionResult::Yield(_)) => {}
87 }
88 }
89
90 fn run_with_context<F>(
91 &self,

Callers 2

finalize_send_resultMethod · 0.80
throwMethod · 0.80

Calls 1

storeMethod · 0.45

Tested by

no test coverage detected