(mut self: Pin<&mut Self>, _cx: &mut Context)
| 39 | type Output = (); |
| 40 | |
| 41 | fn poll(mut self: Pin<&mut Self>, _cx: &mut Context) -> Poll<Self::Output> { |
| 42 | match self.task.state { |
| 43 | State::Halted => { |
| 44 | self.task.state = State::Running; |
| 45 | Poll::Ready(()) |
| 46 | } |
| 47 | State::Running => { |
| 48 | self.task.state = State::Halted; |
| 49 | Poll::Pending |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | struct Executor { |