(&mut self, id: usize)
| 56 | } |
| 57 | |
| 58 | fn restore(&mut self, id: usize) { |
| 59 | unsafe { |
| 60 | let context = self.pool.get_unchecked_mut(id); |
| 61 | ffi::PyThreadState_Swap(context.thread); |
| 62 | unlimited::restore(context.thread, &context.ctx); |
| 63 | context.thread = std::ptr::null_mut(); |
| 64 | context.ctx = Default::default(); |
| 65 | } |
| 66 | self.freelist.push(id); |
| 67 | } |
| 68 | } |
no test coverage detected