Investigate status
danr opened this issue · 0 comments
danr commented
Investigate if we can remove execution_done and only use the status the kernel reports. Is this only idle
and busy
? If so self.running
might be replaced with
- idle
- idle_and_pending_execution
- busy
When interrupting with a new body and we are in:
- idle: just start executing the new body
- idle_and_pending_execution: wait until busy before we send
- busy: send the interruption now
🌟 The assumption is that we're lucky and this will never fail ie the kernel will eventually stop.
Does this mean we need another state busy_and_pending_interruption?
When state changes from busy to idle and there are things scheduled:
- immediately change to idle_and_pending_execution and spawn k.execute