1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use std::{cell::RefCell, rc::Rc, sync::RwLock}; use crate::vm::{Value, Vm, Ptr}; pub struct Thread { func: Ptr, pc: usize, stack: Vec<Value>, } impl Thread { fn run(&mut self, vm: Rc<RwLock<Vm>>) { } fn tick(&mut self, vm: RwLock<Vm>) { } }