Release a batch of handles in one runtime borrow.
(handles: &[u32])
| 154 | |
| 155 | // Release a batch of handles in one runtime borrow. |
| 156 | pub(super) fn release_handles(handles: &[u32]) { |
| 157 | with_runtime(|rt| for &h in handles { rt.handles.release(h); }); |
| 158 | } |
| 159 | |
| 160 | /* `with_vm` that errors when called outside run(). */ |
| 161 | pub(super) fn in_vm(err: &'static str, f: impl FnOnce(&mut VM<'static>) -> Result<Val, VmErr>) -> Result<Val, VmErr> { |
no test coverage detected