Open nnarain opened 4 years ago
Refactor and optimize code. For example the Rc<RefCell<T>>s need to go...
Rc<RefCell<T>>
Also Rc and RefCell cannot be sent across threads and in some cases it might be nice to run the core on its own thread:
Rc
RefCell
let mut nes = Nes::default().with_cart(cart); thread::spawn(move || loop { let data = nes.emulate_frame(); // send data })
https://byuu.net/design/cooperative-threading
Generators with resume arguments: https://play.rust-lang.org/?version=nightly&gist=b6b4919931ffec20b9477bd599f57fcd
Refactor and optimize code. For example the
Rc<RefCell<T>>
s need to go...Also
Rc
andRefCell
cannot be sent across threads and in some cases it might be nice to run the core on its own thread: