use setter instead of modifying the field itself
This commit is contained in:
parent
66d6daf0b9
commit
6c19f66d62
@ -137,7 +137,7 @@ impl ThreadManager {
|
||||
/// Finish the execution of the thread and prepare its deallocation
|
||||
pub fn thread_finish(&mut self, machine: &mut Machine, thread: Rc<RefCell<Thread>>) {
|
||||
let old_status = machine.interrupt.set_status(InterruptStatus::InterruptOff);
|
||||
self.g_thread_to_be_destroyed = Option::Some(Rc::clone(&thread));
|
||||
self.set_g_thread_to_be_destroyed(Option::Some(Rc::clone(&thread)));
|
||||
self.g_alive.remove(Rc::clone(&thread));
|
||||
#[cfg(debug_assertions)]
|
||||
println!("Sleeping thread {}", thread.borrow().get_name());
|
||||
|
Loading…
Reference in New Issue
Block a user