(&self, res: &PyResult<ExecutionResult>)
| 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, |
no test coverage detected