List is now a fifo list

This commit is contained in:
Quentin Legot
2023-03-21 22:03:48 +01:00
parent 977cb2bf96
commit d3b2d0bac6
3 changed files with 147 additions and 85 deletions

View File

@ -139,7 +139,7 @@ impl ThreadManager {
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.g_alive.remove(Rc::clone(&thread));
self.g_alive.remove(&Rc::clone(&thread));
// g_objets_addrs->removeObject(self.thread) // a ajouté plus tard
self.thread_sleep(machine, Rc::clone(&thread));
machine.interrupt.set_status(old_status);