(&mut self, out: &mut Vec<PyObjectRef>)
| 68 | } |
| 69 | |
| 70 | fn clear(&mut self, out: &mut Vec<PyObjectRef>) { |
| 71 | // During GC, we use interior mutability to access elements. |
| 72 | // This is safe because during GC collection, the object is unreachable |
| 73 | // and no other code should be accessing it. |
| 74 | if let Some(mut guard) = self.elements.try_write() { |
| 75 | out.extend(guard.drain(..)); |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | thread_local! { |
nothing calls this directly
no test coverage detected