This is where we start running our runtime. If it is our base task, we call yield until it returns false (which means that there are no tasks scheduled) and we are done.
(&mut self)
| 107 | /// This is where we start running our runtime. If it is our base task, we call yield until |
| 108 | /// it returns false (which means that there are no tasks scheduled) and we are done. |
| 109 | pub fn run(&mut self) { |
| 110 | while self.t_yield() {} |
| 111 | println!("All tasks finished!"); |
| 112 | } |
| 113 | |
| 114 | /// This is our return function. The only place we use this is in our `guard` function. |
| 115 | /// If the current task is not our base task we set its state to Available. It means |