Since UI is in a different thread everything had to be moved from Rc<RefCell<>> to Arc<Mutex<>>.
I guess there's a lot that could be improved, it's my first time working with threads in rust :D
I opted for .unwrap() after .lock() instead of if let Ok(...) = ...lock() because I think it's better to have panics for now instead of "silent failures"
Implements
Play
button in UI.Since UI is in a different thread everything had to be moved from
Rc<RefCell<>>
toArc<Mutex<>>
.I guess there's a lot that could be improved, it's my first time working with threads in rust :D
I opted for
.unwrap()
after.lock()
instead ofif let Ok(...) = ...lock()
because I think it's better to have panics for now instead of "silent failures"